diff options
| author | Sam Steingold | 2000-06-20 18:17:05 +0000 |
|---|---|---|
| committer | Sam Steingold | 2000-06-20 18:17:05 +0000 |
| commit | 427ec0820cd7c396bc2fddcc1cc2cf1b0b482944 (patch) | |
| tree | b4f5374ad39ed8d2ec9011c73597ca36e5ffa6b5 /src/xrdb.c | |
| parent | 8972fe79a7bdb5b2fb557456918e78fecc2e6c86 (diff) | |
| download | emacs-427ec0820cd7c396bc2fddcc1cc2cf1b0b482944.tar.gz emacs-427ec0820cd7c396bc2fddcc1cc2cf1b0b482944.zip | |
Don't declare xmalloc, xrealloc.
Diffstat (limited to 'src/xrdb.c')
| -rw-r--r-- | src/xrdb.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/xrdb.c b/src/xrdb.c index bab1b47d481..72d4deab3a5 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -89,7 +89,6 @@ extern char *get_system_name (); | |||
| 89 | #define malloc xmalloc | 89 | #define malloc xmalloc |
| 90 | #define realloc xrealloc | 90 | #define realloc xrealloc |
| 91 | #define free xfree | 91 | #define free xfree |
| 92 | extern long *xmalloc (), *xrealloc (); | ||
| 93 | #endif | 92 | #endif |
| 94 | 93 | ||
| 95 | char *x_get_string_resource (); | 94 | char *x_get_string_resource (); |
| @@ -227,11 +226,11 @@ magic_file_p (string, string_len, class, escaped_suffix, suffix) | |||
| 227 | free (path); | 226 | free (path); |
| 228 | return NULL; | 227 | return NULL; |
| 229 | } | 228 | } |
| 230 | 229 | ||
| 231 | next = lang; | 230 | next = lang; |
| 232 | next_len = strlen (next); | 231 | next_len = strlen (next); |
| 233 | break; | 232 | break; |
| 234 | 233 | ||
| 235 | case 't': | 234 | case 't': |
| 236 | case 'c': | 235 | case 'c': |
| 237 | free (path); | 236 | free (path); |
| @@ -247,7 +246,7 @@ magic_file_p (string, string_len, class, escaped_suffix, suffix) | |||
| 247 | path_size = (path_len + next_len + 1) * 2; | 246 | path_size = (path_len + next_len + 1) * 2; |
| 248 | path = (char *) realloc (path, path_size); | 247 | path = (char *) realloc (path, path_size); |
| 249 | } | 248 | } |
| 250 | 249 | ||
| 251 | bcopy (next, path + path_len, next_len); | 250 | bcopy (next, path + path_len, next_len); |
| 252 | path_len += next_len; | 251 | path_len += next_len; |
| 253 | 252 | ||
| @@ -309,7 +308,7 @@ gethomedir () | |||
| 309 | ptr = pw->pw_dir; | 308 | ptr = pw->pw_dir; |
| 310 | } | 309 | } |
| 311 | 310 | ||
| 312 | if (ptr == NULL) | 311 | if (ptr == NULL) |
| 313 | return "/"; | 312 | return "/"; |
| 314 | 313 | ||
| 315 | copy = (char *) malloc (strlen (ptr) + 2); | 314 | copy = (char *) malloc (strlen (ptr) + 2); |
| @@ -333,7 +332,7 @@ file_p (path) | |||
| 333 | 332 | ||
| 334 | 333 | ||
| 335 | /* Find the first element of SEARCH_PATH which exists and is readable, | 334 | /* Find the first element of SEARCH_PATH which exists and is readable, |
| 336 | after expanding the %-escapes. Return 0 if we didn't find any, and | 335 | after expanding the %-escapes. Return 0 if we didn't find any, and |
| 337 | the path name of the one we found otherwise. */ | 336 | the path name of the one we found otherwise. */ |
| 338 | 337 | ||
| 339 | static char * | 338 | static char * |
| @@ -346,7 +345,7 @@ search_magic_path (search_path, class, escaped_suffix, suffix) | |||
| 346 | { | 345 | { |
| 347 | for (p = s; *p && *p != ':'; p++) | 346 | for (p = s; *p && *p != ':'; p++) |
| 348 | ; | 347 | ; |
| 349 | 348 | ||
| 350 | if (p > s) | 349 | if (p > s) |
| 351 | { | 350 | { |
| 352 | char *path = magic_file_p (s, p - s, class, escaped_suffix, suffix); | 351 | char *path = magic_file_p (s, p - s, class, escaped_suffix, suffix); |
| @@ -419,7 +418,7 @@ get_user_app (class) | |||
| 419 | || ((path = getenv ("XAPPLRESDIR")) | 418 | || ((path = getenv ("XAPPLRESDIR")) |
| 420 | && ((file = search_magic_path (path, class, "/%L/%N", 0)) | 419 | && ((file = search_magic_path (path, class, "/%L/%N", 0)) |
| 421 | || (file = search_magic_path (path, class, "/%N", 0)))) | 420 | || (file = search_magic_path (path, class, "/%N", 0)))) |
| 422 | 421 | ||
| 423 | /* Check in the home directory. This is a bit of a hack; let's | 422 | /* Check in the home directory. This is a bit of a hack; let's |
| 424 | hope one's home directory doesn't contain any %-escapes. */ | 423 | hope one's home directory doesn't contain any %-escapes. */ |
| 425 | || (free_it = gethomedir (), | 424 | || (free_it = gethomedir (), |
| @@ -542,7 +541,7 @@ x_load_resources (display, xrm_string, myname, myclass) | |||
| 542 | /* Add some font defaults. If the font `helv' doesn't exist, widgets | 541 | /* Add some font defaults. If the font `helv' doesn't exist, widgets |
| 543 | will use some other default font. */ | 542 | will use some other default font. */ |
| 544 | #ifdef USE_MOTIF | 543 | #ifdef USE_MOTIF |
| 545 | 544 | ||
| 546 | sprintf (line, "%s*fontList: %s", myname, helv); | 545 | sprintf (line, "%s*fontList: %s", myname, helv); |
| 547 | XrmPutLineResource (&rdb, line); | 546 | XrmPutLineResource (&rdb, line); |
| 548 | sprintf (line, "%s*menu*background: grey75", myname); | 547 | sprintf (line, "%s*menu*background: grey75", myname); |
| @@ -585,7 +584,7 @@ x_load_resources (display, xrm_string, myname, myclass) | |||
| 585 | } | 584 | } |
| 586 | 585 | ||
| 587 | #else /* not USE_MOTIF */ | 586 | #else /* not USE_MOTIF */ |
| 588 | 587 | ||
| 589 | sprintf (line, "Emacs.dialog*.font: %s", helv); | 588 | sprintf (line, "Emacs.dialog*.font: %s", helv); |
| 590 | XrmPutLineResource (&rdb, line); | 589 | XrmPutLineResource (&rdb, line); |
| 591 | sprintf (line, "Emacs.dialog*.background: grey75"); | 590 | sprintf (line, "Emacs.dialog*.background: grey75"); |
| @@ -596,7 +595,7 @@ x_load_resources (display, xrm_string, myname, myclass) | |||
| 596 | XrmPutLineResource (&rdb, line); | 595 | XrmPutLineResource (&rdb, line); |
| 597 | sprintf (line, "Emacs*verticalScrollBar.background: grey75"); | 596 | sprintf (line, "Emacs*verticalScrollBar.background: grey75"); |
| 598 | XrmPutLineResource (&rdb, line); | 597 | XrmPutLineResource (&rdb, line); |
| 599 | 598 | ||
| 600 | #endif /* not USE_MOTIF */ | 599 | #endif /* not USE_MOTIF */ |
| 601 | 600 | ||
| 602 | user_database = get_user_db (display); | 601 | user_database = get_user_db (display); |
| @@ -631,7 +630,7 @@ x_load_resources (display, xrm_string, myname, myclass) | |||
| 631 | db = get_environ_db (); | 630 | db = get_environ_db (); |
| 632 | if (db != NULL) | 631 | if (db != NULL) |
| 633 | XrmMergeDatabases (db, &rdb); | 632 | XrmMergeDatabases (db, &rdb); |
| 634 | 633 | ||
| 635 | /* Last, merge in any specification from the command line. */ | 634 | /* Last, merge in any specification from the command line. */ |
| 636 | if (xrm_string != NULL) | 635 | if (xrm_string != NULL) |
| 637 | { | 636 | { |