ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/CCSAdmin/common.c
(Generate patch)

Comparing CCSAdmin/common.c (file contents):
Revision 582 by douglas, 2005-09-25T17:43:17-07:00 vs.
Revision 583 by douglas, 2005-11-21T12:56:05-08:00

# Line 6 | Line 6
6  
7   #include "common.h"
8  
9 + Shells shells[] = {
10 +        { "sh", "/bin/sh", "/bin/sh", "/bin/sh", "/usr/bin/sh" },
11 +        { "csh", "/bin/csh", "/bin/csh", "/bin/csh", "/usr/bin/csh" },
12 +        { "tcsh", "/bin/tcsh", "/bin/tcsh", "/bin/tcsh", "/usr/bin/tcsh" },
13 +        { "bash", "/usr/local/bin/bash", "/bin/bash", "/bin/bash", "/usr/local/bin/bash" },
14 +        { "ksh", "/usr/local/bin/ksh", "/bin/ksh", "/bin/ksh", "/usr/bin/ksh" },
15 +        { "zsh", "/usr/local/bin/zsh", "/bin/zsh", "/bin/zsh", "/usr/bin/zsh" },
16 +        { "3sh", "/ccs/bin/3sh", "/ccs/bin/3sh", "/ccs/bin/3sh", "/ccs/bin/3sh" },
17 +        { "custom", NULL, NULL, NULL, NULL }
18 + };
19 +
20   int check(int value, jmp_buf environment)
21   {
22          if (value == -1)
# Line 138 | Line 149 | void get(const char *prompt, regex_t *re
149          while (regcheck(regexec(regex, *string, 0, NULL, 0), regex, environment));
150   }
151  
152 + void setshells(Shells *shells, jmp_buf environment)
153 + {
154 +        check(setenv("FREEBSD", shells->freebsd, 1), environment);
155 +        check(setenv("LINUX", shells->linux, 1), environment);
156 +        check(setenv("DARWIN", shells->darwin, 1), environment);
157 +        check(setenv("SOLARIS", shells->solaris, 1), environment);
158 + }
159 +
160   #ifndef __FreeBSD__
161   size_t strlcpy(char *dst, const char *src, size_t size)
162   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines