From 4ac03926daa3ac1f93d2fef629d30505797ad5f4 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sun, 8 Aug 2010 19:03:34 +0000 Subject: [PATCH] Adjustments for indent 2.2.11. SVN revision: 50909 --- config/strings.c | 350 +++++++++++++++++++++++----------------------- config/strings.pl | 22 +-- epp/cpplib.c | 107 +++++++------- epp/cpplib.h | 5 +- src/aclass.c | 1 + src/backgrounds.c | 1 + src/buttons.c | 1 + src/container.c | 1 + src/cursors.c | 1 + src/desktops.c | 1 + src/dialog.c | 83 +++++------ src/ecompmgr.c | 1 + src/ewins.c | 1 + src/focus.c | 1 + src/fx.c | 1 + src/groups.c | 1 + src/iclass.c | 1 + src/iconify.c | 1 + src/lang.c | 1 + src/lang.h | 18 +-- src/magwin.c | 1 + src/menus.c | 1 + src/mod-trans.c | 1 + src/pager.c | 1 + src/setup.c | 1 + src/slideout.c | 1 + src/sound.c | 1 + src/sound_esd.c | 1 + src/sound_pa.c | 1 + src/systray.c | 1 + src/tclass.c | 1 + src/theme.c | 1 + src/tooltips.c | 1 + src/util.h | 6 +- src/warp.c | 1 + src/windowmatch.c | 1 + 36 files changed, 314 insertions(+), 306 deletions(-) diff --git a/config/strings.c b/config/strings.c index e5b0c288..d873726e 100644 --- a/config/strings.c +++ b/config/strings.c @@ -1,194 +1,194 @@ #define _(x) x -const char *txt[] = { +const char *txt[] = { /* actionclasses.cfg */ -_("Click and drag to move desktop\n(on any desktop but desktop 0)"), -_("Switch Desktops"), -_("Go to the next desktop."), -_("Switch Desktops"), -_("Go to the previous desktop."), -_("Move"), -_("Move this window."), -_("Shade/Unshade this window."), -_("Show the Window Options menu."), -_("Shade/Unshade this window."), -_("Show/Hide group borders."), -_("Start a group."), -_("Add to current group."), -_("Break this window's group."), -_("Shade."), -_("Unshade."), -_("Resize"), -_("Resize this window."), -_("Move this window."), -_("Resize Horizontally"), -_("Resize this window horizontally."), -_("Move this window."), -_("Resize Vertically"), -_("Resize this window vertically."), -_("Move this window."), -_("Close"), -_("Close this window."), -_("Forcibly destroy this window."), -_("Maximize Height"), -_("Toggle between maximum screen height and normal height."), -_("Maximize Width"), -_("Toggle between maximum screen width and normal width."), -_("Maximize"), -_("Toggle between maximum screen size and normal size."), -_("Toggle between maximum screen width and normal width."), -_("Toggle between maximum screen height and normal height."), -_("Send To Another Desktop"), -_("Send this Window to the next desktop."), -_("Send To Another Desktop"), -_("Send this Window to the previous desktop."), -_("Snapshot"), -_("This button does nothing interesting."), -_("Shade/Unshade"), -_("Shade/Unshade this window."), -_("Window Options"), -_("Show the Window Options menu."), -_("Iconify"), -_("Iconify (Minimize) this window."), -_("Show the Window Options menu."), -_("More Buttons"), -_("Show more buttons."), -_("Raise"), -_("Raise this window to the top."), -_("Lower"), -_("Lower this window."), -_("Stick/Unstick"), -_("Toggle the Omnipresent (visible on all Desktops) state of this window."), + _("Click and drag to move desktop\n(on any desktop but desktop 0)"), + _("Switch Desktops"), + _("Go to the next desktop."), + _("Switch Desktops"), + _("Go to the previous desktop."), + _("Move"), + _("Move this window."), + _("Shade/Unshade this window."), + _("Show the Window Options menu."), + _("Shade/Unshade this window."), + _("Show/Hide group borders."), + _("Start a group."), + _("Add to current group."), + _("Break this window's group."), + _("Shade."), + _("Unshade."), + _("Resize"), + _("Resize this window."), + _("Move this window."), + _("Resize Horizontally"), + _("Resize this window horizontally."), + _("Move this window."), + _("Resize Vertically"), + _("Resize this window vertically."), + _("Move this window."), + _("Close"), + _("Close this window."), + _("Forcibly destroy this window."), + _("Maximize Height"), + _("Toggle between maximum screen height and normal height."), + _("Maximize Width"), + _("Toggle between maximum screen width and normal width."), + _("Maximize"), + _("Toggle between maximum screen size and normal size."), + _("Toggle between maximum screen width and normal width."), + _("Toggle between maximum screen height and normal height."), + _("Send To Another Desktop"), + _("Send this Window to the next desktop."), + _("Send To Another Desktop"), + _("Send this Window to the previous desktop."), + _("Snapshot"), + _("This button does nothing interesting."), + _("Shade/Unshade"), + _("Shade/Unshade this window."), + _("Window Options"), + _("Show the Window Options menu."), + _("Iconify"), + _("Iconify (Minimize) this window."), + _("Show the Window Options menu."), + _("More Buttons"), + _("Show more buttons."), + _("Raise"), + _("Raise this window to the top."), + _("Lower"), + _("Lower this window."), + _("Stick/Unstick"), + _("Toggle the Omnipresent (visible on all Desktops) state of this window."), /* bindings.cfg */ -_("Clicking your mouse on the desktop will perform\nthe following actions"), -_("Display User Menus"), -_("Display Enlightenment Menu"), -_("Display Settings Menu"), -_("Display Enlightenment Menu"), -_("Display Task List Menu"), -_("Display Desktop Menu"), -_("Display Group Menu"), -_("Display Settings Menu"), -_("Go Back a Desktop"), -_("Go Forward a Desktop"), + _("Clicking your mouse on the desktop will perform\nthe following actions"), + _("Display User Menus"), + _("Display Enlightenment Menu"), + _("Display Settings Menu"), + _("Display Enlightenment Menu"), + _("Display Task List Menu"), + _("Display Desktop Menu"), + _("Display Group Menu"), + _("Display Settings Menu"), + _("Go Back a Desktop"), + _("Go Forward a Desktop"), /* fonts.pango.cfg */ /* fonts.xft.cfg */ /* matches.cfg */ /* desktop.menu */ -_("Desktop Operations"), -_("Backgrounds"), -_("Cleanup Desktop"), -_("Goto Next Desktop"), -_("Goto Previous Desktop"), -_("Create New Iconbox"), -_("Create Systray"), -_("Show Magnifier"), + _("Desktop Operations"), + _("Backgrounds"), + _("Cleanup Desktop"), + _("Goto Next Desktop"), + _("Goto Previous Desktop"), + _("Create New Iconbox"), + _("Create Systray"), + _("Show Magnifier"), /* enlightenment.menu */ -_("Enlightenment"), -_("User Menus"), -_("Settings"), -_("Desktop"), -_("Themes"), -_("Maintenance"), -_("Help"), -_("About Enlightenment"), -_("About this theme"), -_("Restart"), -_("Log Out"), + _("Enlightenment"), + _("User Menus"), + _("Settings"), + _("Desktop"), + _("Themes"), + _("Maintenance"), + _("Help"), + _("About Enlightenment"), + _("About this theme"), + _("Restart"), + _("Log Out"), /* maintenance.menu */ -_("Maintenance"), -_("Purge config file cache"), -_("Purge pager background cache"), -_("Purge background selector cache"), -_("Purge all caches"), -_("Query config file cache usage"), -_("Query pager background cache usage"), -_("Query background selector cache usage"), -_("Query all cache usage"), -_("Regenerate Menus"), + _("Maintenance"), + _("Purge config file cache"), + _("Purge pager background cache"), + _("Purge background selector cache"), + _("Purge all caches"), + _("Query config file cache usage"), + _("Query pager background cache usage"), + _("Query background selector cache usage"), + _("Query all cache usage"), + _("Regenerate Menus"), /* settings.menu */ -_("Settings"), -_("Settings"), -_("Desktop"), -_("Themes"), -_("Maintenance"), -_("Help"), -_("About Enlightenment"), -_("About this theme"), -_("Restart"), -_("Log Out"), + _("Settings"), + _("Settings"), + _("Desktop"), + _("Themes"), + _("Maintenance"), + _("Help"), + _("About Enlightenment"), + _("About this theme"), + _("Restart"), + _("Log Out"), /* winops.menu */ -_("Window Options"), -_("Close"), -_("Annihilate"), -_("Iconify"), -_("Leave Alone"), -_("Raise"), -_("Lower"), -_("Shade/Unshade"), -_("Stick/Unstick"), -_("Remember..."), -_("Window Size"), -_("Set Stacking"), -_("Set Border Style"), -_("Window Groups"), -_("Opacity"), -_("Miscellaneous"), + _("Window Options"), + _("Close"), + _("Annihilate"), + _("Iconify"), + _("Leave Alone"), + _("Raise"), + _("Lower"), + _("Shade/Unshade"), + _("Stick/Unstick"), + _("Remember..."), + _("Window Size"), + _("Set Stacking"), + _("Set Border Style"), + _("Window Groups"), + _("Opacity"), + _("Miscellaneous"), /* winops_groups.menu */ -_("Groups"), -_("Configure this window's group(s)"), -_("Start a new group"), -_("Add this window to the current group"), -_("Select group to add this window to"), -_("Remove this window from a group"), -_("Destroy a group this window belongs to"), + _("Groups"), + _("Configure this window's group(s)"), + _("Start a new group"), + _("Add this window to the current group"), + _("Select group to add this window to"), + _("Remove this window from a group"), + _("Destroy a group this window belongs to"), /* winops_layer.menu */ -_("Stacking"), -_("Below"), -_("Normal"), -_("Above"), -_("On Top"), + _("Stacking"), + _("Below"), + _("Normal"), + _("Above"), + _("On Top"), /* winops_misc.menu */ -_("Miscellaneous"), -_("Toggle Skip Window Lists"), -_("Toggle Fixed Position"), -_("Toggle Fixed Size"), -_("Toggle Never Focus"), -_("Toggle Click to Focus"), -_("Toggle Never Use Area"), -_("Toggle Button Grabs"), -_("Toggle Autoshade"), + _("Miscellaneous"), + _("Toggle Skip Window Lists"), + _("Toggle Fixed Position"), + _("Toggle Fixed Size"), + _("Toggle Never Focus"), + _("Toggle Click to Focus"), + _("Toggle Never Use Area"), + _("Toggle Button Grabs"), + _("Toggle Autoshade"), /* winops_opacity.menu */ -_("Opacity"), -_("Default"), -_("20%"), -_("40%"), -_("60%"), -_("80%"), -_("100%"), -_("Focused opacity 100%"), -_("Focused opacity follows unfocused"), -_("Toggle Fading"), -_("Toggle Shadows"), + _("Opacity"), + _("Default"), + _("20%"), + _("40%"), + _("60%"), + _("80%"), + _("100%"), + _("Focused opacity 100%"), + _("Focused opacity follows unfocused"), + _("Toggle Fading"), + _("Toggle Shadows"), /* winops_size.menu */ -_("Size"), -_("Max Size Toggle"), -_("Available Max Size Toggle"), -_("Absolute Max Size Toggle"), -_("Span Xinerama Screens"), -_("Max Height Toggle"), -_("Available Max Height Toggle"), -_("Absolute Max Height Toggle"), -_("Max Width Toggle"), -_("Available Max Width Toggle"), -_("Absolute Max Width Toggle"), -_("Fullscreen/Normal"), -_("Zoom/Unzoom"), + _("Size"), + _("Max Size Toggle"), + _("Available Max Size Toggle"), + _("Absolute Max Size Toggle"), + _("Span Xinerama Screens"), + _("Max Height Toggle"), + _("Available Max Height Toggle"), + _("Absolute Max Height Toggle"), + _("Max Width Toggle"), + _("Available Max Width Toggle"), + _("Absolute Max Width Toggle"), + _("Fullscreen/Normal"), + _("Zoom/Unzoom"), -_("User Menus"), -_("User Application List"), -_("Other"), -_("Epplets"), -_("Restart"), -_("Log Out"), + _("User Menus"), + _("User Application List"), + _("Other"), + _("Epplets"), + _("Restart"), + _("Log Out"), }; diff --git a/config/strings.pl b/config/strings.pl index d3c9038f..918026c6 100644 --- a/config/strings.pl +++ b/config/strings.pl @@ -10,7 +10,7 @@ sub x() { $TAT = 0; if (/__TOOLTIP_TEXT\s+\"(.*)\"/) { - # print "_(\"$1\"),\n" + # print " _(\"$1\"),\n" if ($ttt) { $ttt = "$ttt\\n$1"; } else { @@ -18,18 +18,18 @@ sub x() { } $TTT = 1; } elsif (/__TOOLTIP_ACTION_TEXT\s+\"(.*)\"/) { - # print "_(\"$1\"),\n"; + # print " _(\"$1\"),\n"; $tat = "$1"; $TAT = 1; } if (!($TTT) && $ttt) { - print "_(\"$ttt\"),\n"; + print " _(\"$ttt\"),\n"; $ttt = ""; } if (!($TAT) && $tat) { - print "_(\"$tat\"),\n"; + print " _(\"$tat\"),\n"; $tat = ""; } @@ -37,7 +37,7 @@ sub x() { $TDT = 0; if (/^Tooltip\s+(.*)$/) { - # print "_(\"$1\"),\n" + # print " _(\"$1\"),\n" if ($tdt) { $tdt = "$tdt\\n$1"; } else { @@ -47,23 +47,23 @@ sub x() { } if (!($TDT) && $tdt) { - print "_(\"$tdt\"),\n"; + print " _(\"$tdt\"),\n"; $tdt = ""; } # menus.cfg if (/ADD_MENU_TITLE\s*\(\s*(\".*\")/) { $t = "$1"; - print "_($t),\n"; + print " _($t),\n"; } elsif (/ADD_.*MENU_TEXT_ITEM\s*\(\s*(\".*\"),/) { $t = "$1"; - print "_($t),\n"; + print " _($t),\n"; } # *.menu if (/^"([^"]+)"/) { - print "_(\"$1\"),\n"; + print " _(\"$1\"),\n"; } } @@ -81,7 +81,7 @@ sub x() { # Start # print "#define _(x) x\n\n"; -print "const char *txt[] = {\n"; +print "const char *txt[] = {\n"; for ($i=0; $i <= $#ARGV; $i++) { $f = $ARGV[$i]; @@ -96,7 +96,7 @@ for ($i=0; $i <= $#ARGV; $i++) { # Other strings. print "\n"; foreach $s (@sl) { - print "_(\"$s\"),\n"; + print " _(\"$s\"),\n"; } print "};\n"; diff --git a/epp/cpplib.c b/epp/cpplib.c index 48cee064..696ab108 100644 --- a/epp/cpplib.c +++ b/epp/cpplib.c @@ -241,22 +241,22 @@ typedef struct { } MACRODEF; /* Forward declarations. */ +typedef struct file_name_list file_name_list; static void add_import(cpp_reader * pfile, int fd, char *fname); static int finclude(cpp_reader * pfile, int f, const char *fname, - int system_header_p, - struct file_name_list *dirptr); + int system_header_p, file_name_list * dirptr); static void validate_else(cpp_reader * pfile, const char *directive); static int comp_def_part(int first, unsigned char *beg1, int len1, unsigned char *beg2, int len2, int last); static int lookup_import(cpp_reader * pfile, char *filename, - struct file_name_list *searchptr); + file_name_list * searchptr); static int redundant_include_p(cpp_reader * pfile, char *name); static int is_system_include(cpp_reader * pfile, char *filename); static int open_include_file(cpp_reader * pfile, char *filename, - struct file_name_list *searchptr); + file_name_list * searchptr); static int check_macro_name(cpp_reader * pfile, unsigned char *symname, const char *usage); @@ -364,7 +364,7 @@ static void parse_move_mark(struct parse_marker *pmark, cpp_reader * pfile); struct file_name_list { - struct file_name_list *next; + file_name_list *next; char *fname; /* If the following is nonzero, it is a macro name. * Don't include the file again if that macro is defined. */ @@ -380,7 +380,7 @@ struct file_name_list { /* If a buffer's dir field is SELF_DIR_DUMMY, it means the file was found * via the same directory as the file that #included it. */ -#define SELF_DIR_DUMMY ((struct file_name_list*)(~0)) +#define SELF_DIR_DUMMY ((file_name_list*)(~0)) /* #include "file" looks in source file dir, then stack. */ /* #include just looks in the stack. */ @@ -676,16 +676,16 @@ make_assertion(cpp_reader * pfile, const char *option, const char *str) cpp_pop_buffer(pfile); } -/* Append a chain of `struct file_name_list's +/* Append a chain of `file_name_list's * to the end of the main include chain. * FIRST is the beginning of the chain to append, and LAST is the end. */ static void -append_include_chain(cpp_reader * pfile, struct file_name_list *first, - struct file_name_list *last) +append_include_chain(cpp_reader * pfile, file_name_list * first, + file_name_list * last) { struct cpp_options *opts = CPP_OPTIONS(pfile); - struct file_name_list *dir; + file_name_list *dir; if (!first || !last) return; @@ -766,7 +766,7 @@ path_include(cpp_reader * pfile, char *path) { char *q = p; char *name; - struct file_name_list *dirtmp; + file_name_list *dirtmp; /* Find the end of this name. */ while (*q != 0 && *q != PATH_SEPARATOR) @@ -786,8 +786,7 @@ path_include(cpp_reader * pfile, char *path) name[q - p] = 0; } - dirtmp = - (struct file_name_list *)xmalloc(sizeof(struct file_name_list)); + dirtmp = (file_name_list *) xmalloc(sizeof(file_name_list)); dirtmp->next = 0; /* New one goes on the end */ dirtmp->control_macro = 0; @@ -1201,7 +1200,7 @@ collect_expansion(cpp_reader * pfile, unsigned char *buf, unsigned char *limit, { DEFINITION *defn; unsigned char *p, *lastp, *exp_p; - struct reflist *endpat = NULL; + reflist *endpat = NULL; /* Pointer to first nonspace after last ## seen. */ unsigned char *concat = 0; @@ -1388,7 +1387,7 @@ collect_expansion(cpp_reader * pfile, unsigned char *buf, unsigned char *limit, for (arg = arglist; arg != NULL; arg = arg->next) { - struct reflist *tpat; + reflist *tpat; if (arg->name[0] == c && arg->length == id_len @@ -1416,9 +1415,7 @@ collect_expansion(cpp_reader * pfile, unsigned char *buf, unsigned char *limit, break; /* make a pat node for this arg and append it to the end of * the pat list */ - tpat = - (struct reflist *) - xmalloc(sizeof(struct reflist)); + tpat = (reflist *) xmalloc(sizeof(reflist)); tpat->next = NULL; tpat->raw_before = concat == id_beg; @@ -1758,7 +1755,7 @@ check_macro_name(cpp_reader * pfile, unsigned char *symname, const char *usage) static int compare_defs(DEFINITION * d1, DEFINITION * d2) { - struct reflist *a1, *a2; + reflist *a1, *a2; unsigned char *p1 = d1->expansion; unsigned char *p2 = d2->expansion; int first = 1; @@ -2825,8 +2822,7 @@ macroexpand(cpp_reader * pfile, HASHNODE * hp) int offset; /* offset in expansion, * copied a piece at a time */ int totlen; /* total amount of exp buffer filled so far */ - - struct reflist *ap, *last_ap; + reflist *ap, *last_ap; /* Macro really takes args. Compute the expansion of this call. */ @@ -3182,9 +3178,9 @@ do_include(cpp_reader * pfile, struct directive *keyword, enum cpp_token token; /* Chain of dirs to search */ - struct file_name_list *search_start = CPP_OPTIONS(pfile)->include; - struct file_name_list dsp[1]; /* First in chain, if #include "..." */ - struct file_name_list *searchptr = 0; + file_name_list *search_start = CPP_OPTIONS(pfile)->include; + file_name_list dsp[1]; /* First in chain, if #include "..." */ + file_name_list *searchptr = 0; long old_written = CPP_WRITTEN(pfile); int flen; @@ -3482,7 +3478,7 @@ do_include(cpp_reader * pfile, struct directive *keyword, /* Check to see if this include file is a once-only include file. * If so, give up. */ - struct file_name_list *ptr; + file_name_list *ptr; for (ptr = pfile->dont_repeat_files; ptr; ptr = ptr->next) { @@ -3504,8 +3500,7 @@ do_include(cpp_reader * pfile, struct directive *keyword, /* This is the first time for this file. */ /* Add it to list of files included. */ - ptr = - (struct file_name_list *)xmalloc(sizeof(struct file_name_list)); + ptr = (file_name_list *) xmalloc(sizeof(file_name_list)); ptr->control_macro = 0; ptr->c_system_include_path = 0; @@ -3561,7 +3556,7 @@ do_include(cpp_reader * pfile, struct directive *keyword, static int redundant_include_p(cpp_reader * pfile, char *name) { - struct file_name_list *l = pfile->all_include_files; + file_name_list *l = pfile->all_include_files; for (; l; l = l->next) if (!strcmp(name, l->fname) @@ -3585,7 +3580,7 @@ redundant_include_p(cpp_reader * pfile, char *name) static int is_system_include(cpp_reader * pfile, char *filename) { - struct file_name_list *searchptr; + file_name_list *searchptr; for (searchptr = CPP_OPTIONS(pfile)->first_system_include; searchptr; searchptr = searchptr->next) @@ -3953,7 +3948,7 @@ static int do_once(cpp_reader * pfile) { cpp_buffer *ip = NULL; - struct file_name_list *new_; + file_name_list *new_; for (ip = CPP_BUFFER(pfile);; ip = CPP_PREV_BUFFER(ip)) { @@ -3963,7 +3958,7 @@ do_once(cpp_reader * pfile) break; } - new_ = (struct file_name_list *)xmalloc(sizeof(struct file_name_list)); + new_ = (file_name_list *) xmalloc(sizeof(file_name_list)); new_->next = pfile->dont_repeat_files; pfile->dont_repeat_files = new_; @@ -4019,7 +4014,7 @@ do_pragma(cpp_reader * pfile, struct directive *keyword, unsigned char *buf, { /* Be quiet about `#pragma implementation' for a file only if it hasn't * been included yet. */ - struct file_name_list *ptr; + file_name_list *ptr; char *p = (char *)buf + 14, *fname, *inc_fname; int fname_len; @@ -4517,7 +4512,7 @@ do_endif(cpp_reader * pfile, struct directive *keyword, unsigned char *buf, * Do not do this for the top-level file in a -include or any * file in a -imacros. */ { - struct file_name_list *ifile = pfile->all_include_files; + file_name_list *ifile = pfile->all_include_files; for (; ifile != NULL; ifile = ifile->next) { @@ -5284,8 +5279,7 @@ import_hash(char *f) * or -1 if unsuccessful. */ static int -lookup_import(cpp_reader * pfile, char *filename, - struct file_name_list *searchptr) +lookup_import(cpp_reader * pfile, char *filename, file_name_list * searchptr) { struct import_file *i; int h; @@ -5493,7 +5487,7 @@ read_name_map(cpp_reader * pfile, const char *dirname) static int open_include_file(cpp_reader * pfile, char *filename, - struct file_name_list *searchptr) + file_name_list * searchptr) { struct file_name_map *map; const char *from; @@ -5562,7 +5556,7 @@ open_include_file(cpp_reader * pfile, char *filename, static int open_include_file(cpp_reader * pfile, char *filename, - struct file_name_list *searchptr) + file_name_list * searchptr) { pfile = NULL; searchptr = NULL; @@ -5584,7 +5578,7 @@ open_include_file(cpp_reader * pfile, char *filename, static int finclude(cpp_reader * pfile, int f, const char *fname, int system_header_p, - struct file_name_list *dirptr) + file_name_list * dirptr) { int st_mode; long st_size; @@ -5932,10 +5926,9 @@ push_parse_file(cpp_reader * pfile, const char *fname) if (!strncmp(di->fname, default_prefix, default_len)) { /* Yes; change prefix and add to search list. */ - struct file_name_list *new_ + file_name_list *new_ = - (struct file_name_list *) - xmalloc(sizeof(struct file_name_list)); + (file_name_list *) xmalloc(sizeof(file_name_list)); int this_len = strlen(specd_prefix) + strlen(di->fname) - default_len; @@ -5961,9 +5954,8 @@ push_parse_file(cpp_reader * pfile, const char *fname) if (!di->cplusplus || (opts->cplusplus && !opts->no_standard_cplusplus_includes)) { - struct file_name_list *new_ - = (struct file_name_list *) - xmalloc(sizeof(struct file_name_list)); + file_name_list *new_ + = (file_name_list *) xmalloc(sizeof(file_name_list)); new_->control_macro = 0; new_->c_system_include_path = !di->cxx_aware; @@ -5983,7 +5975,7 @@ push_parse_file(cpp_reader * pfile, const char *fname) /* With -v, print the list of dirs to search. */ if (opts->verbose) { - struct file_name_list *fl; + file_name_list *fl; fprintf(stderr, "#include \"...\" search starts here:\n"); for (fl = opts->include; fl; fl = fl->next) @@ -6271,14 +6263,13 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) } if (!strcmp(argv[i], "-isystem")) { - struct file_name_list *dirtmp; + file_name_list *dirtmp; if (i + 1 == argc) cpp_fatal("Filename missing after `-isystem' option"); dirtmp = - (struct file_name_list - *)xmalloc(sizeof(struct file_name_list)); + (file_name_list *) xmalloc(sizeof(file_name_list)); dirtmp->next = 0; dirtmp->control_macro = 0; @@ -6297,7 +6288,7 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) * with the default prefix at the front of its name. */ if (!strcmp(argv[i], "-iwithprefix")) { - struct file_name_list *dirtmp; + file_name_list *dirtmp; char *prefix; if (opts->include_prefix != 0) @@ -6312,8 +6303,7 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) } dirtmp = - (struct file_name_list - *)xmalloc(sizeof(struct file_name_list)); + (file_name_list *) xmalloc(sizeof(file_name_list)); dirtmp->next = 0; /* New one goes on the end */ dirtmp->control_macro = 0; @@ -6338,7 +6328,7 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) * with the default prefix at the front of its name. */ if (!strcmp(argv[i], "-iwithprefixbefore")) { - struct file_name_list *dirtmp; + file_name_list *dirtmp; char *prefix; if (opts->include_prefix != 0) @@ -6353,8 +6343,7 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) } dirtmp = - (struct file_name_list - *)xmalloc(sizeof(struct file_name_list)); + (file_name_list *) xmalloc(sizeof(file_name_list)); dirtmp->next = 0; /* New one goes on the end */ dirtmp->control_macro = 0; @@ -6374,11 +6363,10 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) /* Add directory to end of path for includes. */ if (!strcmp(argv[i], "-idirafter")) { - struct file_name_list *dirtmp; + file_name_list *dirtmp; dirtmp = - (struct file_name_list - *)xmalloc(sizeof(struct file_name_list)); + (file_name_list *) xmalloc(sizeof(file_name_list)); dirtmp->next = 0; /* New one goes on the end */ dirtmp->control_macro = 0; @@ -6660,7 +6648,7 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) case 'I': /* Add directory to path for includes. */ { - struct file_name_list *dirtmp; + file_name_list *dirtmp; if (!CPP_OPTIONS(pfile)->ignore_srcdir && !strcmp(argv[i] + 2, "-")) @@ -6672,8 +6660,7 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) else { dirtmp = - (struct file_name_list - *)xmalloc(sizeof(struct file_name_list)); + (file_name_list *) xmalloc(sizeof(file_name_list)); dirtmp->next = 0; /* New one goes on the end */ dirtmp->control_macro = 0; diff --git a/epp/cpplib.h b/epp/cpplib.h index ec88f9fb..5653dd2f 100644 --- a/epp/cpplib.h +++ b/epp/cpplib.h @@ -552,8 +552,9 @@ enum node_type { { (0, 1), (1, 1), (1, 1), ..., (1, 1), NULL } where (x, y) means (nchars, argno). */ +typedef struct reflist reflist; struct reflist { - struct reflist *next; + reflist *next; char stringify; /* nonzero if this arg was preceded by a * # operator. */ char raw_before; /* Nonzero if a ## operator before arg. */ @@ -574,7 +575,7 @@ struct definition { int line; /* Line number of definition */ const char *file; /* File of definition */ char rest_args; /* Nonzero if last arg. absorbs the rest */ - struct reflist *pattern; + reflist *pattern; union { /* Names of macro args, concatenated in reverse order * with comma-space between them. diff --git a/src/aclass.c b/src/aclass.c index 1a77954b..5d1d709a 100644 --- a/src/aclass.c +++ b/src/aclass.c @@ -1442,6 +1442,7 @@ static const IpcItem AclassIpcArray[] = { * Module descriptor */ extern const EModule ModAclass; + const EModule ModAclass = { "aclass", "ac", AclassSighan, diff --git a/src/backgrounds.c b/src/backgrounds.c index 9f73cf6f..216a25bd 100644 --- a/src/backgrounds.c +++ b/src/backgrounds.c @@ -2549,6 +2549,7 @@ static const CfgItem BackgroundsCfgItems[] = { * Module descriptor */ extern const EModule ModBackgrounds; + const EModule ModBackgrounds = { "backgrounds", "bg", BackgroundsSighan, diff --git a/src/buttons.c b/src/buttons.c index 19c6607d..6f20c6be 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -1085,6 +1085,7 @@ static const CfgItem ButtonsCfgItems[] = { * Module descriptor */ extern const EModule ModButtons; + const EModule ModButtons = { "buttons", "btn", ButtonsSighan, diff --git a/src/container.c b/src/container.c index a6ed54f9..33e88406 100644 --- a/src/container.c +++ b/src/container.c @@ -2014,6 +2014,7 @@ static const CfgItem ContainersCfgItems[] = { * Module descriptor */ extern const EModule ModIconboxes; + const EModule ModIconboxes = { "iconboxes", "ibox", ContainersSighan, diff --git a/src/cursors.c b/src/cursors.c index 73cb9cd0..d76eb361 100644 --- a/src/cursors.c +++ b/src/cursors.c @@ -419,6 +419,7 @@ static const IpcItem CursorIpcArray[] = { * Module descriptor */ extern const EModule ModCursors; + const EModule ModCursors = { "cursor", "csr", NULL, diff --git a/src/desktops.c b/src/desktops.c index f2347097..4ca50e90 100644 --- a/src/desktops.c +++ b/src/desktops.c @@ -2892,6 +2892,7 @@ static const CfgItem DesksCfgItems[] = { * Module descriptor */ extern const EModule ModDesktops; + const EModule ModDesktops = { "desktops", "desk", DesksSighan, diff --git a/src/dialog.c b/src/dialog.c index 4f999ff8..f9801955 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -73,7 +73,7 @@ typedef struct { typedef struct { Win check_win; - int check_orig_w, check_orig_h; + int orig_w, orig_h; char onoff; char *onoff_ptr; } DItemCheckButton; @@ -97,7 +97,7 @@ typedef struct { typedef struct { Win radio_win; - int radio_orig_w, radio_orig_h; + int orig_w, orig_h; char onoff; int val; int *val_ptr; @@ -613,8 +613,8 @@ DialogAddItem(DItem * dii, int type) case DITEM_CHECKBUTTON: di->item.check_button.onoff = 0; di->item.check_button.onoff_ptr = &(di->item.check_button.onoff); - di->item.check_button.check_orig_w = 10; - di->item.check_button.check_orig_h = 10; + di->item.check_button.orig_w = 10; + di->item.check_button.orig_h = 10; break; case DITEM_TABLE: di->item.table.num_columns = 1; @@ -626,8 +626,8 @@ DialogAddItem(DItem * dii, int type) di->item.separator.horizontal = 0; break; case DITEM_RADIOBUTTON: - di->item.radio_button.radio_orig_w = 10; - di->item.radio_button.radio_orig_h = 10; + di->item.radio_button.orig_w = 10; + di->item.radio_button.orig_h = 10; break; case DITEM_SLIDER: di->item.slider.horizontal = 1; @@ -954,14 +954,14 @@ DialogRealizeItem(Dialog * d, DItem * di) im = ImageclassGetImage(di->iclass, 0, 0, 0); if (im) { - EImageGetSize(im, &di->item.check_button.check_orig_w, - &di->item.check_button.check_orig_h); + EImageGetSize(im, &di->item.check_button.orig_w, + &di->item.check_button.orig_h); EImageFree(im); } TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih, 17); - if (ih < di->item.check_button.check_orig_h) - ih = di->item.check_button.check_orig_h; - iw += di->item.check_button.check_orig_w + pad->left; + if (ih < di->item.check_button.orig_h) + ih = di->item.check_button.orig_h; + iw += di->item.check_button.orig_w + pad->left; di->item.check_button.check_win = ECreateWindow(d->win, -20, -20, 2, 2, 0); di->win = ECreateEventWindow(d->win, -20, -20, 2, 2); @@ -1004,14 +1004,14 @@ DialogRealizeItem(Dialog * d, DItem * di) im = ImageclassGetImage(di->iclass, 0, 0, 0); if (im) { - EImageGetSize(im, &di->item.radio_button.radio_orig_w, - &di->item.radio_button.radio_orig_h); + EImageGetSize(im, &di->item.radio_button.orig_w, + &di->item.radio_button.orig_h); EImageFree(im); } TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih, 17); - if (ih < di->item.radio_button.radio_orig_h) - ih = di->item.radio_button.radio_orig_h; - iw += di->item.radio_button.radio_orig_w + pad->left; + if (ih < di->item.radio_button.orig_h) + ih = di->item.radio_button.orig_h; + iw += di->item.radio_button.orig_w + pad->left; di->item.radio_button.radio_win = ECreateWindow(d->win, -20, -20, 2, 2, 0); di->win = ECreateEventWindow(d->win, -20, -20, 2, 2); @@ -1171,27 +1171,21 @@ DialogRealizeItem(Dialog * d, DItem * di) EMoveResizeWindow(dii->win, dii->x, dii->y, dii->w, dii->h); if (dii->type == DITEM_CHECKBUTTON) - EMoveResizeWindow(dii->item.check_button. - check_win, dii->x, + EMoveResizeWindow(dii->item.check_button.check_win, + dii->x, dii->y + - ((dii->h - - dii->item.check_button. - check_orig_h) / 2), - dii->item.check_button. - check_orig_w, - dii->item.check_button. - check_orig_h); + (dii->h - + dii->item.check_button.orig_h) / + 2, dii->item.check_button.orig_w, + dii->item.check_button.orig_h); if (dii->type == DITEM_RADIOBUTTON) - EMoveResizeWindow(dii->item.radio_button. - radio_win, dii->x, + EMoveResizeWindow(dii->item.radio_button.radio_win, + dii->x, dii->y + - ((dii->h - - dii->item.radio_button. - radio_orig_h) / 2), - dii->item.radio_button. - radio_orig_w, - dii->item.radio_button. - radio_orig_h); + (dii->h - + dii->item.radio_button.orig_h) / + 2, dii->item.radio_button.orig_w, + dii->item.radio_button.orig_h); if (dii->type == DITEM_AREA) { pad = ImageclassGetPadding(dii->iclass); @@ -1225,13 +1219,10 @@ DialogRealizeItem(Dialog * d, DItem * di) if (dii->win) EMoveResizeWindow(dii->win, dii->x + - dii->item.slider. - numeric_x, + dii->item.slider.numeric_x, dii->y + - dii->item.slider. - numeric_y, - dii->item.slider. - numeric_w, + dii->item.slider.numeric_y, + dii->item.slider.numeric_w, dii->item.slider.numeric_h); } } @@ -1293,12 +1284,12 @@ MoveTableBy(Dialog * d, DItem * di, int dx, int dy) case DITEM_CHECKBUTTON: EMoveWindow(dii->item.check_button.check_win, dii->x, dii->y + - ((dii->h - dii->item.check_button.check_orig_h) / 2)); + ((dii->h - dii->item.check_button.orig_h) / 2)); break; case DITEM_RADIOBUTTON: EMoveWindow(dii->item.radio_button.radio_win, dii->x, dii->y + - ((dii->h - dii->item.radio_button.radio_orig_h) / 2)); + ((dii->h - dii->item.radio_button.orig_h) / 2)); break; case DITEM_SLIDER: { @@ -1505,8 +1496,8 @@ DialogDrawItem(Dialog * d, DItem * di) TextclassGetTextState(di->tclass, state, 0, 0))) break; pad = ImageclassGetPadding(di->iclass); - x = di->x + di->item.check_button.check_orig_w + pad->left; - w = di->w - di->item.check_button.check_orig_w - pad->left; + x = di->x + di->item.check_button.orig_w + pad->left; + w = di->w - di->item.check_button.orig_w - pad->left; goto draw_text; case DITEM_RADIOBUTTON: @@ -1524,8 +1515,8 @@ DialogDrawItem(Dialog * d, DItem * di) TextclassGetTextState(di->tclass, state, 0, 0))) break; pad = ImageclassGetPadding(di->iclass); - x = di->x + di->item.radio_button.radio_orig_w + pad->left; - w = di->w - di->item.radio_button.radio_orig_w - pad->left; + x = di->x + di->item.radio_button.orig_w + pad->left; + w = di->w - di->item.radio_button.orig_w - pad->left; goto draw_text; default: diff --git a/src/ecompmgr.c b/src/ecompmgr.c index 1debbeab..3a6f20db 100644 --- a/src/ecompmgr.c +++ b/src/ecompmgr.c @@ -2636,6 +2636,7 @@ static const CfgItem CompMgrCfgItems[] = { * Module descriptor */ extern const EModule ModCompMgr; + const EModule ModCompMgr = { "compmgr", "cm", ECompMgrSighan, diff --git a/src/ewins.c b/src/ewins.c index 5bc6ba99..ddac9c2e 100644 --- a/src/ewins.c +++ b/src/ewins.c @@ -2532,6 +2532,7 @@ static const IpcItem EwinsIpcArray[] = { * Module descriptor */ extern const EModule ModEwins; + const EModule ModEwins = { "ewins", NULL, EwinsSighan, diff --git a/src/focus.c b/src/focus.c index 6a4300b5..f195a0ef 100644 --- a/src/focus.c +++ b/src/focus.c @@ -1168,6 +1168,7 @@ static const CfgItem FocusCfgItems[] = { * Module descriptor */ extern const EModule ModFocus; + const EModule ModFocus = { "focus", NULL, FocusSighan, diff --git a/src/fx.c b/src/fx.c index 78f450c5..605f550c 100644 --- a/src/fx.c +++ b/src/fx.c @@ -865,6 +865,7 @@ static const CfgItem FxCfgItems[] = { * Module descriptor */ extern const EModule ModEffects; + const EModule ModEffects = { "effects", "fx", FxSighan, diff --git a/src/groups.c b/src/groups.c index 7706ae64..28e40fa3 100644 --- a/src/groups.c +++ b/src/groups.c @@ -1375,6 +1375,7 @@ static const CfgItem GroupsCfgItems[] = { #define N_CFG_ITEMS (sizeof(GroupsCfgItems)/sizeof(CfgItem)) extern const EModule ModGroups; + const EModule ModGroups = { "groups", "grp", NULL, diff --git a/src/iclass.c b/src/iclass.c index de88acbc..f8280e98 100644 --- a/src/iclass.c +++ b/src/iclass.c @@ -1559,6 +1559,7 @@ static const IpcItem ImageclassIpcArray[] = { * Module descriptor */ extern const EModule ModImageclass; + const EModule ModImageclass = { "imageclass", "ic", NULL, diff --git a/src/iconify.c b/src/iconify.c index 248301a4..309b486d 100644 --- a/src/iconify.c +++ b/src/iconify.c @@ -609,6 +609,7 @@ IconboxObjPlace(Container * ct __UNUSED__, ContainerObject * cto, EImage * im) } extern const ContainerOps IconboxOps; + const ContainerOps IconboxOps = { IconboxInit, IconboxExit, diff --git a/src/lang.c b/src/lang.c index a83f0bfa..dbacfef6 100644 --- a/src/lang.c +++ b/src/lang.c @@ -449,6 +449,7 @@ static const CfgItem LocaleCfgItems[] = { #define N_CFG_ITEMS (sizeof(LocaleCfgItems)/sizeof(CfgItem)) extern const EModule ModLocale; + const EModule ModLocale = { "locale", NULL, NULL, diff --git a/src/lang.h b/src/lang.h index 018da32b..9cd5625b 100644 --- a/src/lang.h +++ b/src/lang.h @@ -29,16 +29,16 @@ #include "config.h" #ifdef ENABLE_NLS -# include -# define _(String) gettext(String) -# ifdef gettext_noop -# define N_(String) gettext_noop(String) -# else -# define N_(String) (String) -# endif +#include +#define _(String) gettext(String) +#ifdef gettext_noop +#define N_(String) gettext_noop(String) #else -# define _(String) (String) -# define N_(String) (String) +#define N_(String) (String) +#endif +#else +#define _(String) (String) +#define N_(String) (String) #endif /* lang.c */ diff --git a/src/magwin.c b/src/magwin.c index 2e4bcde4..bbe8026c 100644 --- a/src/magwin.c +++ b/src/magwin.c @@ -508,6 +508,7 @@ static const IpcItem MagwinIpcArray[] = { * Module descriptor */ extern const EModule ModMagwin; + const EModule ModMagwin = { "magwin", NULL, NULL, diff --git a/src/menus.c b/src/menus.c index a5fb858f..a1abb151 100644 --- a/src/menus.c +++ b/src/menus.c @@ -2251,6 +2251,7 @@ static const CfgItem MenusCfgItems[] = { * Module descriptor */ extern const EModule ModMenus; + const EModule ModMenus = { "menus", "menu", MenusSighan, diff --git a/src/mod-trans.c b/src/mod-trans.c index 21d7afbc..26f43273 100644 --- a/src/mod-trans.c +++ b/src/mod-trans.c @@ -300,6 +300,7 @@ static const CfgItem TransCfgItems[] = { * Module descriptor */ extern const EModule ModTransparency; + const EModule ModTransparency = { "transparency", "tr", TransparencySighan, diff --git a/src/pager.c b/src/pager.c index fad6ac44..d0fed1a9 100644 --- a/src/pager.c +++ b/src/pager.c @@ -2179,6 +2179,7 @@ static const CfgItem PagersCfgItems[] = { * Module descriptor */ extern const EModule ModPagers; + const EModule ModPagers = { "pagers", "pg", PagersSighan, diff --git a/src/setup.c b/src/setup.c index b7bc5e5c..da91c812 100644 --- a/src/setup.c +++ b/src/setup.c @@ -186,6 +186,7 @@ SetupX(const char *dstr) KeyCode nl, sl; unsigned int numlock, scrollock; int i; + int masks[8] = { ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask diff --git a/src/slideout.c b/src/slideout.c index 32aab9d3..e1678ae3 100644 --- a/src/slideout.c +++ b/src/slideout.c @@ -501,6 +501,7 @@ static const IpcItem SlideoutsIpcArray[] = { * Module descriptor */ extern const EModule ModSlideouts; + const EModule ModSlideouts = { "slideouts", "slideout", SlideoutsSighan, diff --git a/src/sound.c b/src/sound.c index 2b3932c3..5ef3e91e 100644 --- a/src/sound.c +++ b/src/sound.c @@ -548,6 +548,7 @@ static const CfgItem SoundCfgItems[] = { * Module descriptor */ extern const EModule ModSound; + const EModule ModSound = { "sound", "audio", SoundSighan, diff --git a/src/sound_esd.c b/src/sound_esd.c index 5ca73ec2..2155d889 100644 --- a/src/sound_esd.c +++ b/src/sound_esd.c @@ -141,6 +141,7 @@ _sound_esd_Exit(void) } __EXPORT__ extern const SoundOps SoundOps_esd; + const SoundOps SoundOps_esd = { _sound_esd_Init, _sound_esd_Exit, _sound_esd_Load, _sound_esd_Destroy, _sound_esd_Play, diff --git a/src/sound_pa.c b/src/sound_pa.c index 749faebe..307c21c7 100644 --- a/src/sound_pa.c +++ b/src/sound_pa.c @@ -346,6 +346,7 @@ _sound_pa_Init(void) } __EXPORT__ extern const SoundOps SoundOps_pa; + const SoundOps SoundOps_pa = { _sound_pa_Init, _sound_pa_Exit, _sound_pa_Load, _sound_pa_Destroy, _sound_pa_Play, diff --git a/src/systray.c b/src/systray.c index 07ae65ac..7eef931a 100644 --- a/src/systray.c +++ b/src/systray.c @@ -491,6 +491,7 @@ SystrayObjPlace(Container * ct __UNUSED__, ContainerObject * cto, } extern const ContainerOps SystrayOps; + const ContainerOps SystrayOps = { SystrayInit, SystrayExit, diff --git a/src/tclass.c b/src/tclass.c index ff98ed65..9d39c44c 100644 --- a/src/tclass.c +++ b/src/tclass.c @@ -495,6 +495,7 @@ static const IpcItem TextclassIpcArray[] = { * Module descriptor */ extern const EModule ModTextclass; + const EModule ModTextclass = { "textclass", "tc", NULL, diff --git a/src/theme.c b/src/theme.c index 0c149870..7a7aa206 100644 --- a/src/theme.c +++ b/src/theme.c @@ -494,6 +494,7 @@ static const CfgItem ThemeCfgItems[] = { * Module descriptor */ extern const EModule ModTheme; + const EModule ModTheme = { "theme", "th", NULL, diff --git a/src/tooltips.c b/src/tooltips.c index 66f639d7..4899dc04 100644 --- a/src/tooltips.c +++ b/src/tooltips.c @@ -890,6 +890,7 @@ static const CfgItem TooltipsCfgItems[] = { * Module descriptor */ extern const EModule ModTooltips; + const EModule ModTooltips = { "tooltips", "tt", TooltipsSighan, diff --git a/src/util.h b/src/util.h index 3ce5f767..d0b2303c 100644 --- a/src/util.h +++ b/src/util.h @@ -36,11 +36,11 @@ /* Inspired by Xfuncproto.h */ #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) -# define __EXPORT__ __attribute__((visibility("default"))) +#define __EXPORT__ __attribute__((visibility("default"))) #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) -# define __EXPORT__ __global +#define __EXPORT__ __global #else /* not gcc >= 3.3 and not Sun Studio >= 8 */ -# define __EXPORT__ +#define __EXPORT__ #endif #if HAVE___ATTRIBUTE__ diff --git a/src/warp.c b/src/warp.c index 7bacdb69..7302f1dc 100644 --- a/src/warp.c +++ b/src/warp.c @@ -526,6 +526,7 @@ static const CfgItem WarplistCfgItems[] = { #define N_CFG_ITEMS (sizeof(WarplistCfgItems)/sizeof(CfgItem)) extern const EModule ModWarplist; + const EModule ModWarplist = { "warplist", "warp", NULL, diff --git a/src/windowmatch.c b/src/windowmatch.c index 0ba3b828..f2c1d278 100644 --- a/src/windowmatch.c +++ b/src/windowmatch.c @@ -982,6 +982,7 @@ static const IpcItem WindowMatchIpcArray[] = { * Module descriptor */ extern const EModule ModWindowMatch; + const EModule ModWindowMatch = { "winmatch", NULL, WindowMatchSighan,