diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-10 10:28:49 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-10 10:28:49 +0000 |
commit | 64fd18cbb2e8fb3ed44dd20ee3d0cced7fa1a5c2 (patch) | |
tree | 256fdc8938df0a0fa1b7f167567d0660aa9e232f /Build/source/texk/xdvik/gui | |
parent | dd3e4c3b3688ba6289553b06af392e42123eb76e (diff) |
towards TL2010: texk/xdvik
git-svn-id: svn://tug.org/texlive/trunk@15967 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik/gui')
-rw-r--r-- | Build/source/texk/xdvik/gui/Tip.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/sfDir.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/sfDraw.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/sfPath.c | 35 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/sfPath.h | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/sfSelFile.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xaw_menu.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xlwradio.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_colorsel.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_filesel.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_menu.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_prefs.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_prefs_appearance.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_prefs_fonts.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_prefs_helpers.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_prefs_page.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_prefs_scroll.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvik/gui/xm_toolbar.c | 2 |
18 files changed, 35 insertions, 34 deletions
diff --git a/Build/source/texk/xdvik/gui/Tip.c b/Build/source/texk/xdvik/gui/Tip.c index d0d7cd328a0..eb0d29c9c6a 100644 --- a/Build/source/texk/xdvik/gui/Tip.c +++ b/Build/source/texk/xdvik/gui/Tip.c @@ -603,5 +603,5 @@ void TipAddWidget(Widget w, Widget watch, const String text) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/sfDir.c b/Build/source/texk/xdvik/gui/sfDir.c index de39ccf3678..3d2983c18cc 100644 --- a/Build/source/texk/xdvik/gui/sfDir.c +++ b/Build/source/texk/xdvik/gui/sfDir.c @@ -161,5 +161,5 @@ SFgetDir(SFDir *dir) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* !defined(MOTIF) */ diff --git a/Build/source/texk/xdvik/gui/sfDraw.c b/Build/source/texk/xdvik/gui/sfDraw.c index b017116e0d4..d980c2bda13 100644 --- a/Build/source/texk/xdvik/gui/sfDraw.c +++ b/Build/source/texk/xdvik/gui/sfDraw.c @@ -816,5 +816,5 @@ SFworkProc(void) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* !defined(MOTIF) */ diff --git a/Build/source/texk/xdvik/gui/sfPath.c b/Build/source/texk/xdvik/gui/sfPath.c index 278f5dc9327..2b225a26bdb 100644 --- a/Build/source/texk/xdvik/gui/sfPath.c +++ b/Build/source/texk/xdvik/gui/sfPath.c @@ -70,8 +70,8 @@ #include <X11/Xaw/Scrollbar.h> typedef struct { - char *name; - char *dir; + const char *name; + const char *dir; } SFLogin; SFDir *SFdirs = NULL; @@ -93,7 +93,7 @@ static SFLogin *SFlogins; static int SFtwiddle = 0; int -SFchdir(char *path) +SFchdir(const char *path) { int result; @@ -131,20 +131,21 @@ SFfree(int i) dir->dir = NULL; } -static void -SFstrdup(char **s1, char *s2) +static char * +SFstrdup(const char *s2) { - *s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2); + char *s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2); + return s1; } static void SFunreadableDir(SFDir *dir) { - char *cannotOpen = "<cannot open> "; + const char *cannotOpen = "<cannot open> "; dir->entries = (SFEntry *) XtMalloc(sizeof(SFEntry)); dir->entries[0].statDone = 1; - SFstrdup(&dir->entries[0].real, cannotOpen); + dir->entries[0].real = SFstrdup(cannotOpen); dir->entries[0].shown = dir->entries[0].real; dir->nEntries = 1; dir->nChars = strlen(cannotOpen); @@ -231,7 +232,7 @@ SFexpand(char *str) dir = &(SFdirs[SFdirEnd - 1]); if (dir->beginSelection == -1) { - SFstrdup(&str, str); + str = SFstrdup(str); SFreplaceText(dir, str); XtFree(str); return; @@ -244,7 +245,7 @@ SFexpand(char *str) max = &(dir->entries[dir->endSelection + 1]); name = dir->entries[dir->beginSelection].shown; - SFstrdup(&growing, name); + growing = SFstrdup(name); cmp = 0; while (!cmp) { @@ -417,7 +418,7 @@ SFgetHomeDirs(void) entries[0].statDone = 1; SFlogins[0].name = ""; pw = getpwuid((int)getuid()); - SFstrdup(&SFlogins[0].dir, pw ? pw->pw_dir : "/"); + SFlogins[0].dir = SFstrdup(pw ? pw->pw_dir : "/"); maxChars = 0; } @@ -443,8 +444,8 @@ SFgetHomeDirs(void) if (len > maxChars) { maxChars = len; } - SFstrdup(&SFlogins[i].name, pw->pw_name); - SFstrdup(&SFlogins[i].dir, pw->pw_dir); + SFlogins[i].name = SFstrdup(pw->pw_name); + SFlogins[i].dir = SFstrdup(pw->pw_dir); i++; } @@ -486,7 +487,7 @@ SFfindHomeDir(char *begin, char *end) for (i = SFhomeDir.nEntries - 1; i >= 0; i--) { if (!strcmp(SFhomeDir.entries[i].real, begin)) { *end = save; - SFstrdup(&theRest, end); + theRest = SFstrdup(end); (void)strcat(strcat(strcpy(SFcurrentPath, SFlogins[i].dir), "/"), theRest); XtFree(theRest); @@ -515,7 +516,7 @@ SFupdatePath(void) if (!SFdirs) { SFdirs = (SFDir *) XtMalloc((alloc = 10) * sizeof(SFDir)); dir = &(SFdirs[0]); - SFstrdup(&dir->dir, "/"); + dir->dir = SFstrdup("/"); (void)SFchdir("/"); (void)SFgetDir(dir); for (j = 1; j < alloc; j++) { @@ -611,7 +612,7 @@ SFupdatePath(void) SFfree(i); } prevChange = 1; - SFstrdup(&dir->dir, begin); + dir->dir = SFstrdup(begin); dir->path = end; dir->vOrigin = 0; dir->hOrigin = 0; @@ -902,5 +903,5 @@ SFstatChar(struct stat *statBuf) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* !defined(MOTIF) */ diff --git a/Build/source/texk/xdvik/gui/sfPath.h b/Build/source/texk/xdvik/gui/sfPath.h index d087c0f804c..3014adf6748 100644 --- a/Build/source/texk/xdvik/gui/sfPath.h +++ b/Build/source/texk/xdvik/gui/sfPath.h @@ -28,7 +28,7 @@ #ifndef MOTIF -extern int SFchdir(char *path); +extern int SFchdir(const char *path); extern void SFupdatePath(void); extern void SFsetText(char *path); extern void SFbuttonPressList(Widget w, int n, XButtonPressedEvent *event); diff --git a/Build/source/texk/xdvik/gui/sfSelFile.c b/Build/source/texk/xdvik/gui/sfSelFile.c index a5b2e19d58c..457fb74b148 100644 --- a/Build/source/texk/xdvik/gui/sfSelFile.c +++ b/Build/source/texk/xdvik/gui/sfSelFile.c @@ -1028,5 +1028,5 @@ XsraSelFilePopup(struct filesel_callback *callback) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* !defined(MOTIF) */ diff --git a/Build/source/texk/xdvik/gui/xaw_menu.c b/Build/source/texk/xdvik/gui/xaw_menu.c index 24d1c39281c..c1fbd45e2e2 100644 --- a/Build/source/texk/xdvik/gui/xaw_menu.c +++ b/Build/source/texk/xdvik/gui/xaw_menu.c @@ -819,5 +819,5 @@ toggle_buttons(void) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* ifndef MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xlwradio.c b/Build/source/texk/xdvik/gui/xlwradio.c index c00e582da56..6542b59133a 100644 --- a/Build/source/texk/xdvik/gui/xlwradio.c +++ b/Build/source/texk/xdvik/gui/xlwradio.c @@ -673,5 +673,5 @@ DrawDiamond(Widget w) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_colorsel.c b/Build/source/texk/xdvik/gui/xm_colorsel.c index f48bcbc7d03..5bf4fec2324 100644 --- a/Build/source/texk/xdvik/gui/xm_colorsel.c +++ b/Build/source/texk/xdvik/gui/xm_colorsel.c @@ -634,5 +634,5 @@ popup_color_dialog(Widget parent, struct color_button_info *button_info) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_filesel.c b/Build/source/texk/xdvik/gui/xm_filesel.c index 09495a8487e..484e84d17c2 100644 --- a/Build/source/texk/xdvik/gui/xm_filesel.c +++ b/Build/source/texk/xdvik/gui/xm_filesel.c @@ -231,5 +231,5 @@ XsraSelFile(Widget parent, struct filesel_callback *callback) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* defined(MOTIF) */ diff --git a/Build/source/texk/xdvik/gui/xm_menu.c b/Build/source/texk/xdvik/gui/xm_menu.c index 1a117c24856..bc54ad88d1b 100644 --- a/Build/source/texk/xdvik/gui/xm_menu.c +++ b/Build/source/texk/xdvik/gui/xm_menu.c @@ -359,6 +359,6 @@ xm_create_menu(Widget parent, char *title, char mnemonic, struct button_info *it #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_prefs.c b/Build/source/texk/xdvik/gui/xm_prefs.c index 4c389259b45..f214ca1886c 100644 --- a/Build/source/texk/xdvik/gui/xm_prefs.c +++ b/Build/source/texk/xdvik/gui/xm_prefs.c @@ -586,5 +586,5 @@ popup_preferences_dialog(Widget parent, int arg) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_prefs_appearance.c b/Build/source/texk/xdvik/gui/xm_prefs_appearance.c index e65f84cbf2f..326b11b3143 100644 --- a/Build/source/texk/xdvik/gui/xm_prefs_appearance.c +++ b/Build/source/texk/xdvik/gui/xm_prefs_appearance.c @@ -536,5 +536,5 @@ prefs_appearance(struct topic_info *info) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_prefs_fonts.c b/Build/source/texk/xdvik/gui/xm_prefs_fonts.c index a79658b3d5f..ac1868bcc57 100644 --- a/Build/source/texk/xdvik/gui/xm_prefs_fonts.c +++ b/Build/source/texk/xdvik/gui/xm_prefs_fonts.c @@ -688,5 +688,5 @@ prefs_fonts_and_colors(struct topic_info *info) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_prefs_helpers.c b/Build/source/texk/xdvik/gui/xm_prefs_helpers.c index 49b19c406a4..d4b0b6996dc 100644 --- a/Build/source/texk/xdvik/gui/xm_prefs_helpers.c +++ b/Build/source/texk/xdvik/gui/xm_prefs_helpers.c @@ -893,6 +893,6 @@ prefs_helpers(struct topic_info *tinfo) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_prefs_page.c b/Build/source/texk/xdvik/gui/xm_prefs_page.c index cbff7b3c065..f18eeacbfb8 100644 --- a/Build/source/texk/xdvik/gui/xm_prefs_page.c +++ b/Build/source/texk/xdvik/gui/xm_prefs_page.c @@ -686,6 +686,6 @@ prefs_paper(struct topic_info *info) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_prefs_scroll.c b/Build/source/texk/xdvik/gui/xm_prefs_scroll.c index 0e33793f93e..b3697713261 100644 --- a/Build/source/texk/xdvik/gui/xm_prefs_scroll.c +++ b/Build/source/texk/xdvik/gui/xm_prefs_scroll.c @@ -465,6 +465,6 @@ prefs_scrolling(struct topic_info *info) #else /* silence `empty compilation unit' warnings */ -static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ diff --git a/Build/source/texk/xdvik/gui/xm_toolbar.c b/Build/source/texk/xdvik/gui/xm_toolbar.c index 514a84a5126..4984862db57 100644 --- a/Build/source/texk/xdvik/gui/xm_toolbar.c +++ b/Build/source/texk/xdvik/gui/xm_toolbar.c @@ -857,5 +857,5 @@ create_tips(Widget toplevel) #else /* MOTIF */ /* silence "empty compilation unit" and "`toolbar_xpm' defined but not used" warnings */ -static void bar(void); static void foo() { UNUSED(toolbar_xpm); bar(); } static void bar(void) { foo(); } +static void bar(void); static void foo(void) { UNUSED(toolbar_xpm); bar(); } static void bar(void) { foo(); } #endif /* MOTIF */ |