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.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{ |
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; |
76 while (isascii(*s) && isdigit(*s) && i < tTsize) |
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++; |
86 first = i; 87 88 /* find last flag to set */ 89 if (*s == '-') 90 { 91 i = 0; |
92 while (isascii(*++s) && isdigit(*s) && i < tTsize) |
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++; |
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 --- |