X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/c3be260484f4cd5a9fb6f9ebc503ae4cecca2252..ed62d3fbeda6bb085991cdd683ceacfc57f7afbe:/src/cppexp.c?ds=sidebyside diff --git a/src/cppexp.c b/src/cppexp.c index 588eaf1..60f16b0 100644 --- a/src/cppexp.c +++ b/src/cppexp.c @@ -1,6 +1,6 @@ /* ** Splint - annotation-assisted static program checker -** Copyright (C) 1994-2002 University of Virginia, +** Copyright (C) 1994-2003 University of Virginia, ** Massachusetts Institute of Technology ** ** This program is free software; you can redistribute it and/or modify it @@ -57,7 +57,7 @@ Written by Per Bothner 1994. */ # include # include "splintMacros.nf" -# include "llbasic.h" +# include "basic.h" # include "cpplib.h" # include "cpphash.h" # include "cppexp.h" @@ -256,7 +256,7 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR for (i = 0; i < len; i++) { - /*drl bee: is*/ if (p[i] == '.') { + if (p[i] == '.') { /* It's a float since it contains a point. */ cppReader_errorLit (pfile, @@ -276,11 +276,6 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR } else if (*p == '0') { - /*@i3434*/ - /* drl: see if there is a reason that we shouldn't do - p++; - len--; */ - base = 8; } else @@ -335,7 +330,7 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR /*@innerbreak@*/ break; } - /*drl bee: ltc*/ c = *p++; + c = *p++; } /* Don't look for any more digits after the suffixes. */ break; @@ -371,7 +366,6 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR if (overflow) { - /*@i23 add flags for all these...*/ cppReader_pedwarnLit (pfile, cstring_makeLiteralTemp ("Integer constant out of range")); @@ -516,7 +510,7 @@ struct operation cppexp_lex (cppReader *pfile) } ++ptr; - /*drl bee: hda*/ while (ptr < tok_end && ((c = *ptr++) != '\'')) + while (ptr < tok_end && ((c = *ptr++) != '\'')) { if (c == '\\') { @@ -547,7 +541,7 @@ struct operation cppexp_lex (cppReader *pfile) } } - /*drl bee: dad*/ token_buffer[num_chars] = 0; + token_buffer[num_chars] = 0; if (c != '\'') cppReader_errorLit (pfile, @@ -629,8 +623,8 @@ struct operation cppexp_lex (cppReader *pfile) { for (toktab = tokentab2; toktab->operator != NULL; toktab++) { - /*drl bee: hda*/ if (tok_start[0] == /*drl bee: hda*/ toktab->operator[0] - && /*drl bee: hda*/ tok_start[1] == /*drl bee: hda*/ toktab->operator[1]) + if (tok_start[0] == toktab->operator[0] && + tok_start[1] == toktab->operator[1]) { /*@loopbreak@*/ break; } @@ -674,7 +668,7 @@ struct operation cppexp_lex (cppReader *pfile) int cppReader_parseEscape (cppReader *pfile, char **string_ptr) { - /*drl bee: pbr*/ char c = *(*string_ptr)++; + char c = *(*string_ptr)++; switch (c) { @@ -728,7 +722,7 @@ cppReader_parseEscape (cppReader *pfile, char **string_ptr) else { - /*drl bee: pbr*/ (*string_ptr)--; + (*string_ptr)--; /*@loopbreak@*/ break; } } @@ -1305,7 +1299,7 @@ cppReader_parseExpression (cppReader *pfile) { struct operation *new_stack; size_t old_size = size_fromInt ((char *) limit - (char *) stack); - size_t new_size = 2 * old_size; + size_t new_size = (size_t) (2 * old_size); if (stack != init_stack) {