context in execError, define, CVS update
[nedit-bw.git] / shell-in-help-output.patch
blob4e4825a0bd497b2a11c621033fd58662a273ca8a
1 Subject: used shell in --version
3 Show the configured shell and the system default shell in the help output.
5 ---
7 source/help.c | 5 ++++-
8 source/preferences.c | 7 +++----
9 source/preferences.h | 1 +
10 3 files changed, 8 insertions(+), 5 deletions(-)
12 diff --quilt old/source/help.c new/source/help.c
13 --- old/source/help.c
14 +++ new/source/help.c
15 @@ -236,6 +236,8 @@ static const char *getBuildInfo(void)
16 " Server: %s %d\n"
17 " Visual: %s\n"
18 " Locale: %s\n"
19 + " NEdit Shell: %s\n"
20 + "Default Shell: %s\n"
23 static const char *visualClass[] = {"StaticGray", "GrayScale",
24 @@ -278,7 +280,8 @@ static const char *getBuildInfo(void)
25 (NULL == TheDisplay ? "<unknown>" : ServerVendor(TheDisplay)),
26 (NULL == TheDisplay ? 0 : VendorRelease(TheDisplay)),
27 visualStr,
28 - locale ? locale : "None");
29 + locale ? locale : "None",
30 + GetPrefShell(), GetDefaultShell());
32 if (stab == MotifKnownBad)
33 strcat(bldInfoString, warning);
34 diff --quilt old/source/preferences.c new/source/preferences.c
35 --- old/source/preferences.c
36 +++ new/source/preferences.c
37 @@ -1245,7 +1245,6 @@ static int stringReplace(char **inString
38 int replaceLen);
39 static int replaceMacroIfUnchanged(const char* oldText, const char* newStart,
40 const char* newEnd);
41 -static const char* getDefaultShell(void);
44 #ifdef SGI_CUSTOM
45 @@ -1413,11 +1412,11 @@ static void translatePrefFormats(int con
47 ** The default set for the comand shell in PrefDescrip ("DEFAULT") is
48 ** only a place-holder, the actual default is the user's login shell
49 - ** (or whatever is implemented in getDefaultShell()). We put the login
50 + ** (or whatever is implemented in GetDefaultShell()). We put the login
51 ** shell's name in PrefData here.
53 if (0 == strcmp(PrefData.shell, "DEFAULT")) {
54 - strncpy(PrefData.shell, getDefaultShell(), MAXPATHLEN);
55 + strncpy(PrefData.shell, GetDefaultShell(), MAXPATHLEN);
56 PrefData.shell[MAXPATHLEN] = '\0';
59 @@ -6504,7 +6503,7 @@ void ChooseColors(WindowInfo *window)
60 ** shell, currently defined as the user's login shell.
61 ** In case of errors, the fallback of "sh" will be returned.
63 -static const char* getDefaultShell(void)
64 +const char* GetDefaultShell(void)
66 struct passwd* passwdEntry = NULL;
67 static char shellBuffer[MAXPATHLEN + 1] = "sh";
68 diff --quilt old/source/preferences.h new/source/preferences.h
69 --- old/source/preferences.h
70 +++ new/source/preferences.h
71 @@ -149,6 +149,7 @@ char *GetPrefColorName(int colorIndex);
72 void SetPrefColorName(int colorIndex, const char *color);
73 void SetPrefShell(const char *shell);
74 const char* GetPrefShell(void);
75 +const char* GetDefaultShell(void);
76 char *GetPrefGeometry(void);
77 char *GetPrefServerName(void);
78 char *GetPrefBGMenuBtn(void);