comparison lib-src/etags.c @ 72328:bf72b454a40d

(readline): Change position on %n and \" in sscanf.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 09 Aug 2006 06:56:16 +0000
parents 1fb4cb2b0ce0
children 43638213c829
comparison
equal deleted inserted replaced
72327:1fb4cb2b0ce0 72328:bf72b454a40d
6257 if (result > 12 && strneq (lbp->buffer, "#line ", 6)) 6257 if (result > 12 && strneq (lbp->buffer, "#line ", 6))
6258 { 6258 {
6259 int start, lno; 6259 int start, lno;
6260 6260
6261 if (DEBUG) start = 0; /* shut up the compiler */ 6261 if (DEBUG) start = 0; /* shut up the compiler */
6262 if (sscanf (lbp->buffer, "#line %d \"%n", &lno, &start) >= 1) 6262 if (sscanf (lbp->buffer, "#line %d %n\"", &lno, &start) >= 1
6263 { 6263 && inp[start] == '"')
6264 char *endp = lbp->buffer + start; 6264 {
6265 char *endp = lbp->buffer + ++start;
6265 6266
6266 assert (start > 0); 6267 assert (start > 0);
6267 while ((endp = etags_strchr (endp, '"')) != NULL 6268 while ((endp = etags_strchr (endp, '"')) != NULL
6268 && endp[-1] == '\\') 6269 && endp[-1] == '\\')
6269 endp++; 6270 endp++;