diff options
| author | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
| commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
| tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/xrdb.c | |
| parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
| download | emacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip | |
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
Diffstat (limited to 'src/xrdb.c')
| -rw-r--r-- | src/xrdb.c | 55 |
1 files changed, 18 insertions, 37 deletions
diff --git a/src/xrdb.c b/src/xrdb.c index bd3474c0466..870672611e4 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -50,7 +50,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 50 | 50 | ||
| 51 | #include "lisp.h" | 51 | #include "lisp.h" |
| 52 | 52 | ||
| 53 | extern char *getenv (); | 53 | extern char *getenv (const char *); |
| 54 | 54 | ||
| 55 | /* This does cause trouble on AIX. I'm going to take the comment at | 55 | /* This does cause trouble on AIX. I'm going to take the comment at |
| 56 | face value. */ | 56 | face value. */ |
| @@ -64,8 +64,8 @@ extern short getuid (); /* If this causes portability problems, | |||
| 64 | extern struct passwd *getpwuid (uid_t); | 64 | extern struct passwd *getpwuid (uid_t); |
| 65 | extern struct passwd *getpwnam (const char *); | 65 | extern struct passwd *getpwnam (const char *); |
| 66 | #else | 66 | #else |
| 67 | extern struct passwd *getpwuid (); | 67 | extern struct passwd *getpwuid (uid_t); |
| 68 | extern struct passwd *getpwnam (); | 68 | extern struct passwd *getpwnam (const char *); |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
| 71 | extern char *get_system_name (); | 71 | extern char *get_system_name (); |
| @@ -82,8 +82,8 @@ extern char *get_system_name (); | |||
| 82 | #define free xfree | 82 | #define free xfree |
| 83 | #endif | 83 | #endif |
| 84 | 84 | ||
| 85 | char *x_get_string_resource (); | 85 | char *x_get_string_resource (XrmDatabase rdb, char *name, char *class); |
| 86 | static int file_p (); | 86 | static int file_p (char *filename); |
| 87 | 87 | ||
| 88 | 88 | ||
| 89 | /* X file search path processing. */ | 89 | /* X file search path processing. */ |
| @@ -98,9 +98,7 @@ char *x_customization_string; | |||
| 98 | resource, for later use in search path decoding. If we find no | 98 | resource, for later use in search path decoding. If we find no |
| 99 | such resource, return zero. */ | 99 | such resource, return zero. */ |
| 100 | char * | 100 | char * |
| 101 | x_get_customization_string (db, name, class) | 101 | x_get_customization_string (XrmDatabase db, char *name, char *class) |
| 102 | XrmDatabase db; | ||
| 103 | char *name, *class; | ||
| 104 | { | 102 | { |
| 105 | char *full_name | 103 | char *full_name |
| 106 | = (char *) alloca (strlen (name) + sizeof ("customization") + 3); | 104 | = (char *) alloca (strlen (name) + sizeof ("customization") + 3); |
| @@ -155,10 +153,7 @@ x_get_customization_string (db, name, class) | |||
| 155 | Return NULL otherwise. */ | 153 | Return NULL otherwise. */ |
| 156 | 154 | ||
| 157 | static char * | 155 | static char * |
| 158 | magic_file_p (string, string_len, class, escaped_suffix, suffix) | 156 | magic_file_p (char *string, int string_len, char *class, char *escaped_suffix, char *suffix) |
| 159 | char *string; | ||
| 160 | int string_len; | ||
| 161 | char *class, *escaped_suffix, *suffix; | ||
| 162 | { | 157 | { |
| 163 | char *lang = getenv ("LANG"); | 158 | char *lang = getenv ("LANG"); |
| 164 | 159 | ||
| @@ -281,7 +276,7 @@ magic_file_p (string, string_len, class, escaped_suffix, suffix) | |||
| 281 | 276 | ||
| 282 | 277 | ||
| 283 | static char * | 278 | static char * |
| 284 | gethomedir () | 279 | gethomedir (void) |
| 285 | { | 280 | { |
| 286 | struct passwd *pw; | 281 | struct passwd *pw; |
| 287 | char *ptr; | 282 | char *ptr; |
| @@ -311,8 +306,7 @@ gethomedir () | |||
| 311 | 306 | ||
| 312 | 307 | ||
| 313 | static int | 308 | static int |
| 314 | file_p (filename) | 309 | file_p (char *filename) |
| 315 | char *filename; | ||
| 316 | { | 310 | { |
| 317 | struct stat status; | 311 | struct stat status; |
| 318 | 312 | ||
| @@ -327,8 +321,7 @@ file_p (filename) | |||
| 327 | the path name of the one we found otherwise. */ | 321 | the path name of the one we found otherwise. */ |
| 328 | 322 | ||
| 329 | static char * | 323 | static char * |
| 330 | search_magic_path (search_path, class, escaped_suffix, suffix) | 324 | search_magic_path (char *search_path, char *class, char *escaped_suffix, char *suffix) |
| 331 | char *search_path, *class, *escaped_suffix, *suffix; | ||
| 332 | { | 325 | { |
| 333 | register char *s, *p; | 326 | register char *s, *p; |
| 334 | 327 | ||
| @@ -363,8 +356,7 @@ search_magic_path (search_path, class, escaped_suffix, suffix) | |||
| 363 | /* Producing databases for individual sources. */ | 356 | /* Producing databases for individual sources. */ |
| 364 | 357 | ||
| 365 | static XrmDatabase | 358 | static XrmDatabase |
| 366 | get_system_app (class) | 359 | get_system_app (char *class) |
| 367 | char *class; | ||
| 368 | { | 360 | { |
| 369 | XrmDatabase db = NULL; | 361 | XrmDatabase db = NULL; |
| 370 | char *path; | 362 | char *path; |
| @@ -384,16 +376,14 @@ get_system_app (class) | |||
| 384 | 376 | ||
| 385 | 377 | ||
| 386 | static XrmDatabase | 378 | static XrmDatabase |
| 387 | get_fallback (display) | 379 | get_fallback (Display *display) |
| 388 | Display *display; | ||
| 389 | { | 380 | { |
| 390 | return NULL; | 381 | return NULL; |
| 391 | } | 382 | } |
| 392 | 383 | ||
| 393 | 384 | ||
| 394 | static XrmDatabase | 385 | static XrmDatabase |
| 395 | get_user_app (class) | 386 | get_user_app (char *class) |
| 396 | char *class; | ||
| 397 | { | 387 | { |
| 398 | char *path; | 388 | char *path; |
| 399 | char *file = 0; | 389 | char *file = 0; |
| @@ -428,8 +418,7 @@ get_user_app (class) | |||
| 428 | 418 | ||
| 429 | 419 | ||
| 430 | static XrmDatabase | 420 | static XrmDatabase |
| 431 | get_user_db (display) | 421 | get_user_db (Display *display) |
| 432 | Display *display; | ||
| 433 | { | 422 | { |
| 434 | XrmDatabase db; | 423 | XrmDatabase db; |
| 435 | char *xdefs; | 424 | char *xdefs; |
| @@ -470,7 +459,7 @@ get_user_db (display) | |||
| 470 | } | 459 | } |
| 471 | 460 | ||
| 472 | static XrmDatabase | 461 | static XrmDatabase |
| 473 | get_environ_db () | 462 | get_environ_db (void) |
| 474 | { | 463 | { |
| 475 | XrmDatabase db; | 464 | XrmDatabase db; |
| 476 | char *p; | 465 | char *p; |
| @@ -505,9 +494,7 @@ XrmRepresentation x_rm_string; /* Quark representation */ | |||
| 505 | /* Load X resources based on the display and a possible -xrm option. */ | 494 | /* Load X resources based on the display and a possible -xrm option. */ |
| 506 | 495 | ||
| 507 | XrmDatabase | 496 | XrmDatabase |
| 508 | x_load_resources (display, xrm_string, myname, myclass) | 497 | x_load_resources (Display *display, char *xrm_string, char *myname, char *myclass) |
| 509 | Display *display; | ||
| 510 | char *xrm_string, *myname, *myclass; | ||
| 511 | { | 498 | { |
| 512 | XrmDatabase user_database; | 499 | XrmDatabase user_database; |
| 513 | XrmDatabase rdb; | 500 | XrmDatabase rdb; |
| @@ -641,11 +628,7 @@ x_load_resources (display, xrm_string, myname, myclass) | |||
| 641 | and of type TYPE from database RDB. The value is returned in RET_VALUE. */ | 628 | and of type TYPE from database RDB. The value is returned in RET_VALUE. */ |
| 642 | 629 | ||
| 643 | int | 630 | int |
| 644 | x_get_resource (rdb, name, class, expected_type, ret_value) | 631 | x_get_resource (XrmDatabase rdb, char *name, char *class, XrmRepresentation expected_type, XrmValue *ret_value) |
| 645 | XrmDatabase rdb; | ||
| 646 | char *name, *class; | ||
| 647 | XrmRepresentation expected_type; | ||
| 648 | XrmValue *ret_value; | ||
| 649 | { | 632 | { |
| 650 | XrmValue value; | 633 | XrmValue value; |
| 651 | XrmName namelist[100]; | 634 | XrmName namelist[100]; |
| @@ -673,9 +656,7 @@ x_get_resource (rdb, name, class, expected_type, ret_value) | |||
| 673 | database RDB. */ | 656 | database RDB. */ |
| 674 | 657 | ||
| 675 | char * | 658 | char * |
| 676 | x_get_string_resource (rdb, name, class) | 659 | x_get_string_resource (XrmDatabase rdb, char *name, char *class) |
| 677 | XrmDatabase rdb; | ||
| 678 | char *name, *class; | ||
| 679 | { | 660 | { |
| 680 | XrmValue value; | 661 | XrmValue value; |
| 681 | 662 | ||