=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rdist/lookup.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/rdist/lookup.c 2002/05/27 03:14:22 1.10 --- src/usr.bin/rdist/lookup.c 2003/05/14 01:34:35 1.11 *************** *** 1,4 **** ! /* $OpenBSD: lookup.c,v 1.10 2002/05/27 03:14:22 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: lookup.c,v 1.11 2003/05/14 01:34:35 millert Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. *************** *** 33,56 **** * SUCH DAMAGE. */ #ifndef lint #if 0 ! static char RCSid[] = ! "$From: lookup.c,v 6.8 1996/07/19 16:49:55 michaelc Exp $"; #else ! static char RCSid[] = ! "$OpenBSD: lookup.c,v 1.10 2002/05/27 03:14:22 deraadt Exp $"; #endif ! static char sccsid[] = "@(#)lookup.c 5.1 (Berkeley) 6/6/85"; ! static char copyright[] = "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ - #include "defs.h" - /* symbol types */ #define VAR 1 #define CONST 2 --- 33,57 ---- * SUCH DAMAGE. */ + #include "defs.h" + #ifndef lint #if 0 ! static char RCSid[] __attribute__((__unused__)) = ! "$From: lookup.c,v 1.4 1999/08/04 15:57:33 christos Exp $"; #else ! static char RCSid[] __attribute__((__unused__)) = ! "$OpenBSD: lookup.c,v 1.11 2003/05/14 01:34:35 millert Exp $"; #endif ! static char sccsid[] __attribute__((__unused__)) = ! "@(#)lookup.c 5.1 (Berkeley) 6/6/85"; ! static char copyright[] __attribute__((__unused__)) = "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ /* symbol types */ #define VAR 1 #define CONST 2 *************** *** 68,75 **** * Define a variable from a command line argument. */ void ! define(name) ! char *name; { char *cp, *s; struct namelist *nl; --- 69,75 ---- * Define a variable from a command line argument. */ void ! define(char *name) { char *cp, *s; struct namelist *nl; *************** *** 132,141 **** */ struct namelist * ! lookup(name, action, value) /* %% in name. Ignore quotas in name */ ! char *name; ! int action; ! struct namelist *value; { unsigned int n; char *cp; --- 132,138 ---- */ struct namelist * ! lookup(char *name, int action, struct namelist *value) { unsigned int n; char *cp; *************** *** 155,161 **** if (action != LOOKUP) { if (action != INSERT || s->s_type != CONST) { (void) snprintf(ebuf, sizeof(ebuf), ! "%s redefined", name); yyerror(ebuf); } } --- 152,160 ---- if (action != LOOKUP) { if (action != INSERT || s->s_type != CONST) { (void) snprintf(ebuf, sizeof(ebuf), ! "%.*s redefined", ! (int)(sizeof(ebuf) - ! sizeof(" redefined")), name); yyerror(ebuf); } } *************** *** 163,169 **** } if (action == LOOKUP) { ! (void) snprintf(ebuf, sizeof(ebuf), "%s undefined", name); yyerror(ebuf); return(NULL); } --- 162,170 ---- } if (action == LOOKUP) { ! (void) snprintf(ebuf, sizeof(ebuf), "%.*s undefined", ! (int)(sizeof(ebuf) - sizeof(" undefined")), ! name); yyerror(ebuf); return(NULL); }