AmendHub

Download:

jcs

/

subtext

/

amendments

/

139

util: Make DITLs const, fix ask() to dispose of the proper handle


jcs made amendment 139 over 2 years ago
--- util.c Tue Jun 7 14:04:37 2022 +++ util.c Mon Jun 13 15:50:58 2022 @@ -31,7 +31,7 @@ static char err_str[ERROR_STRING_SIZE]; /* basic DITL with an ok button (1), text area (2), and icon (3) */ #define ALERT_DITL_ICON 3 -static char alert_ditl[] = { +static const char alert_ditl[] = { 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0xE6, 0x00, 0x5A, 0x01, 0x20, 0x04, 0x02, 0x4F, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, @@ -43,7 +43,7 @@ static char alert_ditl[] = { static Handle alert_ditl_h = NULL; /* DITL with a Yes button (1), No button (2), text (3), and icon (4) */ -static char ask_ditl[] = { +static const char ask_ditl[] = { 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0xE6, 0x00, 0x5A, 0x01, 0x20, 0x04, 0x03, 0x59, 0x65, 0x73, 0x21, 0x00, 0x00, 0x00, 0x00, @@ -57,7 +57,7 @@ static char ask_ditl[] = { static Handle ask_ditl_h = NULL; /* DITL with just a text view */ -static char progress_ditl[] = { +static const char progress_ditl[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x1E, 0x00, 0x32, 0x01, 0x3B, 0x08, 0x02, 0x5E, 0x30 @@ -418,7 +418,7 @@ ask(const char *format, ...) break; } DisposDialog(dialog); - DisposHandle(ask_ditl); + DisposHandle(ask_ditl_h); SetPort(win);