FILE *fp;
char *cp, *editor = UD_DEFAULT_EDITOR;
static char template[MED_BUF_SIZE];
+#ifndef HAVE_SPAWNLP
int pid;
int status;
+#endif
int rc;
- void (*handler)();
#ifdef DEBUG
if (debug & D_TRACE)
}
else if (pid > 0) {
/* parent - wait until the child proc is done editing */
+ void (*handler)();
handler = SIGNAL(SIGINT, SIG_IGN);
(void) wait(&status);
(void) SIGNAL(SIGINT, handler);
register int i, j;
for (i = 0; attrs[i].quipu_name != NULL; i++) {
- if (!modifiable(attrs[i].quipu_name, flag|ATTR_FLAG_MAY_EDIT))
+ if (!modifiable(attrs[i].quipu_name,
+ (short) (flag|ATTR_FLAG_MAY_EDIT)))
+ {
continue;
+ }
+
fprintf(fp, "%s\n", attrs[i].quipu_name);
if ( attrs[i].number_of_values > MAX_VALUES ) {
printf(" The %s attribute has more than %d values.\n",
/* now tackle the user's commands */
do_commands();
/* NOTREACHED */
+
+ return 0;
}
void
{
FILE *fp; /* for config file */
static char buffer[MED_BUF_SIZE]; /* for input */
+#ifdef HAVE_GETPWUID
struct passwd *pw; /* for getting the home dir */
+#endif
register char *cp; /* for fiddling with buffer */
- char *term; /* for tty set-up */
char *config; /* config file to use */
static char bp[1024]; /* for tty set-up */
* A per-user config file has precedence over any system-wide
* config file, if one exists.
*/
-#ifdef HAVE_GETPWUID_H
+#ifdef HAVE_GETPWUID
if ((pw = getpwuid((uid_t) geteuid())) == (struct passwd *) NULL)
config = config_file;
else {
#ifndef NO_TERMCAP
{
+ char *term;
struct winsize win; /* for tty set-up */
if (((term = getenv("TERM")) == NULL) || (tgetent(bp, term) <= 0))