comparison lib-src/etags.c @ 14021:19bab04cf346

(substitute): Fix spelling in message.
author Karl Heuer <kwzh@gnu.org>
date Fri, 05 Jan 1996 00:52:01 +0000
parents f89aa5a5c485
children beb39f795f21
comparison
equal deleted inserted replaced
14020:1ea8008d4bd8 14021:19bab04cf346
1247 np->file = curfile; 1247 np->file = curfile;
1248 np->is_func = is_func; 1248 np->is_func = is_func;
1249 np->lno = lno; 1249 np->lno = lno;
1250 /* Our char numbers are 0-base, because of C language tradition? 1250 /* Our char numbers are 0-base, because of C language tradition?
1251 ctags compatibility? old versions compatibility? I don't know. 1251 ctags compatibility? old versions compatibility? I don't know.
1252 Anyway, since emacs's are 1-base we espect etags.el to take care 1252 Anyway, since emacs's are 1-base we expect etags.el to take care
1253 of the difference. If we wanted to have 1-based numbers, we would 1253 of the difference. If we wanted to have 1-based numbers, we would
1254 uncomment the +1 below. */ 1254 uncomment the +1 below. */
1255 np->cno = cno /* + 1 */ ; 1255 np->cno = cno /* + 1 */ ;
1256 np->left = np->right = NULL; 1256 np->left = np->right = NULL;
1257 if (CTAGS && !cxref_style) 1257 if (CTAGS && !cxref_style)
1651 } funcdef; 1651 } funcdef;
1652 1652
1653 1653
1654 /* 1654 /*
1655 * typedefs are recognized using a simple finite automaton. 1655 * typedefs are recognized using a simple finite automaton.
1656 * typeddef is its state variable. 1656 * typdef is its state variable.
1657 */ 1657 */
1658 enum 1658 enum
1659 { 1659 {
1660 tnone, /* nothing seen */ 1660 tnone, /* nothing seen */
1661 ttypedseen, /* typedef keyword seen */ 1661 ttypedseen, /* typedef keyword seen */
1968 if (toktype == st_C_objend) 1968 if (toktype == st_C_objend)
1969 { 1969 {
1970 /* Memory leakage here: the string pointed by objtag is 1970 /* Memory leakage here: the string pointed by objtag is
1971 never released, because many tests would be needed to 1971 never released, because many tests would be needed to
1972 avoid breaking on incorrect input code. The amount of 1972 avoid breaking on incorrect input code. The amount of
1973 memory leaked here is the sum of the lenghts of the 1973 memory leaked here is the sum of the lengths of the
1974 class tags. 1974 class tags.
1975 free (objtag); */ 1975 free (objtag); */
1976 objdef = onone; 1976 objdef = onone;
1977 } 1977 }
1978 return FALSE; 1978 return FALSE;
2575 if (typdef == tinbody) 2575 if (typdef == tinbody)
2576 typdef = tend; 2576 typdef = tend;
2577 /* Memory leakage here: the string pointed by structtag is 2577 /* Memory leakage here: the string pointed by structtag is
2578 never released, because I fear to miss something and 2578 never released, because I fear to miss something and
2579 break things while freeing the area. The amount of 2579 break things while freeing the area. The amount of
2580 memory leaked here is the sum of the lenghts of the 2580 memory leaked here is the sum of the lengths of the
2581 struct tags. 2581 struct tags.
2582 if (structdef == sinbody) 2582 if (structdef == sinbody)
2583 free (structtag); */ 2583 free (structtag); */
2584 2584
2585 structdef = snone; 2585 structdef = snone;
3550 } 3550 }
3551 3551
3552 #ifdef ETAGS_REGEXPS 3552 #ifdef ETAGS_REGEXPS
3553 /* Take a string like "/blah/" and turn it into "blah", making sure 3553 /* Take a string like "/blah/" and turn it into "blah", making sure
3554 that the first and last characters are the same, and handling 3554 that the first and last characters are the same, and handling
3555 quoted separator characters. Actually, stops on the occurence of 3555 quoted separator characters. Actually, stops on the occurrence of
3556 an unquoted separator. Also turns "\t" into a Tab character. 3556 an unquoted separator. Also turns "\t" into a Tab character.
3557 Returns pointer to terminating separator. Works in place. Null 3557 Returns pointer to terminating separator. Works in place. Null
3558 terminates name string. */ 3558 terminates name string. */
3559 char * 3559 char *
3560 scan_separators (name) 3560 scan_separators (name)
3672 if (*t == '\\') 3672 if (*t == '\\')
3673 { 3673 {
3674 ++t; 3674 ++t;
3675 if (!*t) 3675 if (!*t)
3676 { 3676 {
3677 fprintf (stderr, "%s: pattern subtitution ends prematurely\n", 3677 fprintf (stderr, "%s: pattern substitution ends prematurely\n",
3678 progname); 3678 progname);
3679 return NULL; 3679 return NULL;
3680 } 3680 }
3681 if (isdigit (*t)) 3681 if (isdigit (*t))
3682 { 3682 {