diff options
Diffstat (limited to 'textscreen/examples/guitest.c')
-rw-r--r-- | textscreen/examples/guitest.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/textscreen/examples/guitest.c b/textscreen/examples/guitest.c index 08faae98..3904ffa9 100644 --- a/textscreen/examples/guitest.c +++ b/textscreen/examples/guitest.c @@ -76,13 +76,13 @@ void UpdateLabel(TXT_UNCAST_ARG(widget), void *user_data) { char buf[40]; - strcpy(buf, " Current value: "); + TXT_StringCopy(buf, " Current value: ", sizeof(buf)); if (cheesy) { - strcat(buf, "Cheesy "); + TXT_StringConcat(buf, "Cheesy ", sizeof(buf)); } - strcat(buf, radio_values[radiobutton_value]); - strcat(buf, "\n"); + TXT_StringConcat(buf, radio_values[radiobutton_value], sizeof(buf)); + TXT_StringConcat(buf, "\n", sizeof(buf)); TXT_SetLabel(value_label, buf); } @@ -119,11 +119,11 @@ void SetupWindow(void) for (i=0; i<5; ++i) { - sprintf(buf, "Option %i in a table:", i + 1); + TXT_snprintf(buf, sizeof(buf), "Option %i in a table:", i + 1); TXT_AddWidget(table, TXT_NewLabel(buf)); - sprintf(buf, " Button %i-1 ", i + 1); + TXT_snprintf(buf, sizeof(buf), " Button %i-1 ", i + 1); TXT_AddWidget(table, TXT_NewButton(buf)); - sprintf(buf, " Button %i-2 ", i + 1); + TXT_snprintf(buf, sizeof(buf), " Button %i-2 ", i + 1); TXT_AddWidget(table, TXT_NewButton(buf)); } |