patch-2.2.2 linux/scripts/lxdialog/yesno.c
Next file: linux/scripts/tkgen.c
Previous file: linux/scripts/lxdialog/textbox.c
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Mon Feb 1 12:03:20 1999
- Orig file:
v2.2.1/linux/scripts/lxdialog/yesno.c
- Orig date:
Sat Mar 2 23:22:25 1996
diff -u --recursive --new-file v2.2.1/linux/scripts/lxdialog/yesno.c linux/scripts/lxdialog/yesno.c
@@ -63,6 +63,14 @@
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)