=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/printf/printf.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/printf/printf.c 1996/06/26 05:37:59 1.2 --- src/usr.bin/printf/printf.c 1997/01/17 07:13:06 1.3 *************** *** 1,4 **** ! /* $OpenBSD: printf.c,v 1.2 1996/06/26 05:37:59 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: printf.c,v 1.3 1997/01/17 07:13:06 millert Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. *************** *** 43,49 **** #ifndef lint /*static char sccsid[] = "from: @(#)printf.c 5.9 (Berkeley) 6/1/90";*/ ! static char rcsid[] = "$OpenBSD: printf.c,v 1.2 1996/06/26 05:37:59 deraadt Exp $"; #endif /* not lint */ #include --- 43,49 ---- #ifndef lint /*static char sccsid[] = "from: @(#)printf.c 5.9 (Berkeley) 6/1/90";*/ ! static char rcsid[] = "$OpenBSD: printf.c,v 1.3 1997/01/17 07:13:06 millert Exp $"; #endif /* not lint */ #include *************** *** 190,205 **** } /* skip to field width */ ! for (; index(SKIP1, *fmt); ++fmt) ; fieldwidth = *fmt == '*' ? getint() : 0; /* skip to possible '.', get following precision */ ! for (; index(SKIP2, *fmt); ++fmt) ; if (*fmt == '.') ++fmt; precision = *fmt == '*' ? getint() : 0; ! for (; index(SKIP2, *fmt); ++fmt) ; if (!*fmt) { warnx ("missing format character"); return(1); --- 190,205 ---- } /* skip to field width */ ! for (; strchr(SKIP1, *fmt); ++fmt) ; fieldwidth = *fmt == '*' ? getint() : 0; /* skip to possible '.', get following precision */ ! for (; strchr(SKIP2, *fmt); ++fmt) ; if (*fmt == '.') ++fmt; precision = *fmt == '*' ? getint() : 0; ! for (; strchr(SKIP2, *fmt); ++fmt) ; if (!*fmt) { warnx ("missing format character"); return(1); *************** *** 446,452 **** if (!*gargv) return(0); ! if (index(number, **gargv)) return(atoi(*gargv++)); return 0; --- 446,452 ---- if (!*gargv) return(0); ! if (strchr(number, **gargv)) return(atoi(*gargv++)); return 0;