aboutsummaryrefslogtreecommitdiffstats
path: root/src/xrdb.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/xrdb.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-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.c55
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
53extern char *getenv (); 53extern 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,
64extern struct passwd *getpwuid (uid_t); 64extern struct passwd *getpwuid (uid_t);
65extern struct passwd *getpwnam (const char *); 65extern struct passwd *getpwnam (const char *);
66#else 66#else
67extern struct passwd *getpwuid (); 67extern struct passwd *getpwuid (uid_t);
68extern struct passwd *getpwnam (); 68extern struct passwd *getpwnam (const char *);
69#endif 69#endif
70 70
71extern char *get_system_name (); 71extern 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
85char *x_get_string_resource (); 85char *x_get_string_resource (XrmDatabase rdb, char *name, char *class);
86static int file_p (); 86static 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. */
100char * 100char *
101x_get_customization_string (db, name, class) 101x_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
157static char * 155static char *
158magic_file_p (string, string_len, class, escaped_suffix, suffix) 156magic_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
283static char * 278static char *
284gethomedir () 279gethomedir (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
313static int 308static int
314file_p (filename) 309file_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
329static char * 323static char *
330search_magic_path (search_path, class, escaped_suffix, suffix) 324search_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
365static XrmDatabase 358static XrmDatabase
366get_system_app (class) 359get_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
386static XrmDatabase 378static XrmDatabase
387get_fallback (display) 379get_fallback (Display *display)
388 Display *display;
389{ 380{
390 return NULL; 381 return NULL;
391} 382}
392 383
393 384
394static XrmDatabase 385static XrmDatabase
395get_user_app (class) 386get_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
430static XrmDatabase 420static XrmDatabase
431get_user_db (display) 421get_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
472static XrmDatabase 461static XrmDatabase
473get_environ_db () 462get_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
507XrmDatabase 496XrmDatabase
508x_load_resources (display, xrm_string, myname, myclass) 497x_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
643int 630int
644x_get_resource (rdb, name, class, expected_type, ret_value) 631x_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
675char * 658char *
676x_get_string_resource (rdb, name, class) 659x_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