trace.c (66494) | trace.c (82017) |
---|---|
1/* 2 * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#ifndef lint | 1/* 2 * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#ifndef lint |
15static char id[] = "@(#)$Id: trace.c,v 8.20.22.2 2000/09/17 17:04:27 gshapiro Exp $"; | 15static char id[] = "@(#)$Id: trace.c,v 8.20.22.4 2001/08/15 13:05:43 ca Exp $"; |
16#endif /* ! lint */ 17 18#include <sendmail.h> 19 20/* 21** TtSETUP -- set up for trace package. 22** 23** Parameters: --- 34 unchanged lines hidden (view full) --- 58** Side Effects: 59** sets/clears trace flags. 60*/ 61 62void 63tTflag(s) 64 register char *s; 65{ | 16#endif /* ! lint */ 17 18#include <sendmail.h> 19 20/* 21** TtSETUP -- set up for trace package. 22** 23** Parameters: --- 34 unchanged lines hidden (view full) --- 58** Side Effects: 59** sets/clears trace flags. 60*/ 61 62void 63tTflag(s) 64 register char *s; 65{ |
66 int first, last; | 66 unsigned int first, last; |
67 register unsigned int i; 68 69 if (*s == '\0') 70 s = DefFlags; 71 72 for (;;) 73 { 74 /* find first flag to set */ 75 i = 0; | 67 register unsigned int i; 68 69 if (*s == '\0') 70 s = DefFlags; 71 72 for (;;) 73 { 74 /* find first flag to set */ 75 i = 0; |
76 while (isascii(*s) && isdigit(*s)) | 76 while (isascii(*s) && isdigit(*s) && i < tTsize) |
77 i = i * 10 + (*s++ - '0'); | 77 i = i * 10 + (*s++ - '0'); |
78 79 /* 80 ** skip over rest of a too large number 81 ** Maybe we should complain if out-of-bounds values are used. 82 */ 83 84 while (isascii(*s) && isdigit(*s) && i >= tTsize) 85 s++; |
|
78 first = i; 79 80 /* find last flag to set */ 81 if (*s == '-') 82 { 83 i = 0; | 86 first = i; 87 88 /* find last flag to set */ 89 if (*s == '-') 90 { 91 i = 0; |
84 while (isascii(*++s) && isdigit(*s)) | 92 while (isascii(*++s) && isdigit(*s) && i < tTsize) |
85 i = i * 10 + (*s - '0'); | 93 i = i * 10 + (*s - '0'); |
94 95 /* skip over rest of a too large number */ 96 while (isascii(*s) && isdigit(*s) && i >= tTsize) 97 s++; |
|
86 } 87 last = i; 88 89 /* find the level to set it to */ 90 i = 1; 91 if (*s == '.') 92 { 93 i = 0; --- 19 unchanged lines hidden --- | 98 } 99 last = i; 100 101 /* find the level to set it to */ 102 i = 1; 103 if (*s == '.') 104 { 105 i = 0; --- 19 unchanged lines hidden --- |