Mercurial > hg > xemacs-beta
comparison src/device-x.c @ 647:b39c14581166
[xemacs-hg @ 2001-08-13 04:45:47 by ben]
removal of unsigned, size_t, etc.
author | ben |
---|---|
date | Mon, 13 Aug 2001 04:46:48 +0000 |
parents | 190b164ddcac |
children | fdefd0186b75 |
comparison
equal
deleted
inserted
replaced
646:00c54252fe4f | 647:b39c14581166 |
---|---|
305 /* Only the characters [-_A-Za-z0-9] are allowed in the individual | 305 /* Only the characters [-_A-Za-z0-9] are allowed in the individual |
306 components of a resource. Convert invalid characters to `-' */ | 306 components of a resource. Convert invalid characters to `-' */ |
307 | 307 |
308 static char valid_resource_char_p[256]; | 308 static char valid_resource_char_p[256]; |
309 | 309 |
310 /* #### not just char * here; may be fixed in my Mule ws */ | |
310 static void | 311 static void |
311 validify_resource_component (char *str, size_t len) | 312 validify_resource_component (char *str, Memory_Count len) |
312 { | 313 { |
313 for (; len; len--, str++) | 314 for (; len; len--, str++) |
314 if (!valid_resource_char_p[(unsigned char) (*str)]) | 315 if (!valid_resource_char_p[(unsigned char) (*str)]) |
315 *str = '-'; | 316 *str = '-'; |
316 } | 317 } |
1580 CHECK_STRING (resource_line); | 1581 CHECK_STRING (resource_line); |
1581 str = (char *) XSTRING_DATA (resource_line); | 1582 str = (char *) XSTRING_DATA (resource_line); |
1582 if (!(colon_pos = strchr (str, ':')) || strchr (str, '\n')) | 1583 if (!(colon_pos = strchr (str, ':')) || strchr (str, '\n')) |
1583 invalid: | 1584 invalid: |
1584 syntax_error ("Invalid resource line", resource_line); | 1585 syntax_error ("Invalid resource line", resource_line); |
1585 if (strspn (str, | 1586 if ((int) strspn (str, |
1586 /* Only the following chars are allowed before the colon */ | 1587 /* Only the following chars are allowed before the colon */ |
1587 " \t.*?abcdefghijklmnopqrstuvwxyz" | 1588 " \t.*?abcdefghijklmnopqrstuvwxyz" |
1588 "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-") | 1589 "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-") |
1589 != (size_t) (colon_pos - str)) | 1590 != colon_pos - str) |
1590 goto invalid; | 1591 goto invalid; |
1591 | 1592 |
1592 if (DEVICE_X_P (d)) | 1593 if (DEVICE_X_P (d)) |
1593 { | 1594 { |
1594 XrmDatabase db = XtDatabase (DEVICE_X_DISPLAY (d)); | 1595 XrmDatabase db = XtDatabase (DEVICE_X_DISPLAY (d)); |