version 1.12, 2002/02/19 19:39:38 |
version 1.13, 2002/06/09 21:11:22 |
|
|
gethostname(host, sizeof(host)); |
gethostname(host, sizeof(host)); |
strcpy(tempfile, _PATH_TMP); |
strcpy(tempfile, _PATH_TMP); |
strcat(tempfile, _RDIST_TMP); |
strcat(tempfile, _RDIST_TMP); |
tempname = xbasename(tempfile); |
tempname = basename(tempfile); |
|
|
while (--argc > 0) { |
while (--argc > 0) { |
if ((arg = *++argv)[0] != '-') |
if ((arg = *++argv)[0] != '-') |
|
|
nl = nl->n_next; |
nl = nl->n_next; |
} |
} |
printf(")\n"); |
printf(")\n"); |
} |
|
|
|
void |
|
warn(const char *fmt, ...) |
|
{ |
|
extern int yylineno; |
|
va_list ap; |
|
|
|
va_start(ap, fmt); |
|
(void)fprintf(stderr, "rdist: line %d: Warning: ", yylineno); |
|
(void)vfprintf(stderr, fmt, ap); |
|
(void)fprintf(stderr, "\n"); |
|
va_end(ap); |
|
} |
|
|
|
/* |
|
* Private version of basename() |
|
*/ |
|
char *xbasename(path) |
|
char *path; |
|
{ |
|
char *cp; |
|
|
|
if (cp = strrchr(path, '/')) |
|
return(cp+1); |
|
else |
|
return(path); |
|
} |
} |