projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fa7f659
)
Ugliness left over from someone's CVS editing session removed. Who did this?
author
Nate Willams
<nate@FreeBSD.org>
Tue, 2 Nov 1993 21:10:59 +0000
(21:10 +0000)
committer
Nate Willams
<nate@FreeBSD.org>
Tue, 2 Nov 1993 21:10:59 +0000
(21:10 +0000)
usr.sbin/sendmail/praliases/praliases.c
patch
|
blob
|
blame
|
history
diff --git
a/usr.sbin/sendmail/praliases/praliases.c
b/usr.sbin/sendmail/praliases/praliases.c
index
7a8fc46
..
8ba77a5
100644
(file)
--- a/
usr.sbin/sendmail/praliases/praliases.c
+++ b/
usr.sbin/sendmail/praliases/praliases.c
@@
-1,12
+1,7
@@
/*
* Copyright (c) 1983 Eric P. Allman
/*
* Copyright (c) 1983 Eric P. Allman
-<<<<<<< 1.2
- * Copyright (c) 1988 Regents of the University of California.
- * All rights reserved.
-=======
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
->>>>>>> /tmp/T4010782
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@
-38,78
+33,39
@@
*/
#ifndef lint
*/
#ifndef lint
-<<<<<<< 1.2
-char copyright[] =
-"@(#) Copyright (c) 1988 Regents of the University of California.\n\
- All rights reserved.\n";
-=======
static char copyright[] =
"@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
static char copyright[] =
"@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
->>>>>>> /tmp/T4010782
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-<<<<<<< 1.2
-static char sccsid[] = "@(#)praliases.c 5.5 (Berkeley) 6/1/90";
-=======
-static char sccsid[] = "@(#)praliases.c 8.1 (Berkeley) 6/7/93";
->>>>>>> /tmp/T4010782
+static char sccsid[] = "@(#)praliases.c 8.2 (Berkeley) 9/22/93";
#endif /* not lint */
#endif /* not lint */
-<<<<<<< 1.2
-=======
#include <ndbm.h>
#include <ndbm.h>
->>>>>>> /tmp/T4010782
#include <sendmail.h>
#include <sendmail.h>
-<<<<<<< 1.2
-=======
#ifdef NEWDB
#include <db.h>
#endif
#ifdef NEWDB
#include <db.h>
#endif
->>>>>>> /tmp/T4010782
-<<<<<<< 1.2
-typedef struct {
- char *dptr;
- int dsize;
-} datum;
-
-
-=======
int
int
->>>>>>> /tmp/T4010782
main(argc, argv)
main(argc, argv)
-<<<<<<< 1.2
-=======
int argc;
int argc;
->>>>>>> /tmp/T4010782
char **argv;
{
extern char *optarg;
extern int optind;
char **argv;
{
extern char *optarg;
extern int optind;
-<<<<<<< 1.2
- static char *filename = "/usr/lib/aliases";
- datum content, key, firstkey(), nextkey(), fetch();
-=======
DBM *dbp;
datum content, key;
char *filename;
DBM *dbp;
datum content, key;
char *filename;
->>>>>>> /tmp/T4010782
int ch;
int ch;
-<<<<<<< 1.2
-=======
#ifdef NEWDB
const DB *db;
DBT newdbkey, newdbcontent;
char buf[MAXNAME];
#endif
#ifdef NEWDB
const DB *db;
DBT newdbkey, newdbcontent;
char buf[MAXNAME];
#endif
->>>>>>> /tmp/T4010782
-<<<<<<< 1.2
-=======
filename = "/etc/aliases";
filename = "/etc/aliases";
->>>>>>> /tmp/T4010782
while ((ch = getopt(argc, argv, "f:")) != EOF)
switch((char)ch) {
case 'f':
while ((ch = getopt(argc, argv, "f:")) != EOF)
switch((char)ch) {
case 'f':
@@
-117,24
+73,12
@@
main(argc, argv)
break;
case '?':
default:
break;
case '?':
default:
-<<<<<<< 1.2
- fputs("usage: praliases [-f file]\n", stderr);
-=======
(void)fprintf(stderr, "usage: praliases [-f file]\n");
(void)fprintf(stderr, "usage: praliases [-f file]\n");
->>>>>>> /tmp/T4010782
exit(EX_USAGE);
}
argc -= optind;
argv += optind;
exit(EX_USAGE);
}
argc -= optind;
argv += optind;
-<<<<<<< 1.2
- if (dbminit(filename) < 0)
- exit(EX_OSFILE);
- if (!argc)
- for (key = firstkey(); key.dptr; key = nextkey(key)) {
- content = fetch(key);
- printf("%s:%s\n", key.dptr, content.dptr);
-=======
#ifdef NEWDB
(void) strcpy(buf, filename);
(void) strcat(buf, ".db");
#ifdef NEWDB
(void) strcpy(buf, filename);
(void) strcat(buf, ".db");
@@
-163,7
+107,7
@@
main(argc, argv)
exit(EX_OSFILE);
}
if (!argc)
exit(EX_OSFILE);
}
if (!argc)
- for (key = dbm_
nex
tkey(dbp);
+ for (key = dbm_
firs
tkey(dbp);
key.dptr != NULL; key = dbm_nextkey(dbp)) {
content = dbm_fetch(dbp, key);
(void)printf("%s:%s\n", key.dptr, content.dptr);
key.dptr != NULL; key = dbm_nextkey(dbp)) {
content = dbm_fetch(dbp, key);
(void)printf("%s:%s\n", key.dptr, content.dptr);
@@
-176,24
+120,9
@@
main(argc, argv)
(void)printf("%s: No such key\n", key.dptr);
else
(void)printf("%s:%s\n", key.dptr, content.dptr);
(void)printf("%s: No such key\n", key.dptr);
else
(void)printf("%s:%s\n", key.dptr, content.dptr);
->>>>>>> /tmp/T4010782
}
}
-<<<<<<< 1.2
- else for (; *argv; ++argv) {
- key.dptr = *argv;
- key.dsize = strlen(*argv) + 1;
- content = fetch(key);
- if (!content.dptr)
- printf("%s: No such key\n", key.dptr);
- else
- printf("%s:%s\n", key.dptr, content.dptr);
-=======
#ifdef NEWDB
#ifdef NEWDB
->>>>>>> /tmp/T4010782
}
}
-<<<<<<< 1.2
-=======
#endif
#endif
->>>>>>> /tmp/T4010782
exit(EX_OK);
}
exit(EX_OK);
}