Mercurial > emacs
comparison lib-src/etags.c @ 727:540b047ece4d
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 24 Jun 1992 05:09:26 +0000 |
parents | eca8812e61cd |
children | 11867ad5bab4 |
comparison
equal
deleted
inserted
replaced
726:5f08efa38dd0 | 727:540b047ece4d |
---|---|
408 * | 408 * |
409 * Note that this macro may only be evaluated inside C_entries(). It is | 409 * Note that this macro may only be evaluated inside C_entries(). It is |
410 * for self-documentation only. | 410 * for self-documentation only. |
411 */ | 411 */ |
412 #define LEVEL_OK_FOR_FUNCDEF() \ | 412 #define LEVEL_OK_FOR_FUNCDEF() \ |
413 (level==0 || c_ext && level==1 && structdef==sinbody) | 413 (level==0 || (c_ext && level==1 && structdef==sinbody)) |
414 | 414 |
415 /* | 415 /* |
416 * next_token_is_func | 416 * next_token_is_func |
417 * set this to TRUE, and the next token considered is called a function. | 417 * set this to TRUE, and the next token considered is called a function. |
418 */ | 418 */ |
1281 } | 1281 } |
1282 else if (vgrind_style) | 1282 else if (vgrind_style) |
1283 fprintf (stdout, "%s %s %d\n", | 1283 fprintf (stdout, "%s %s %d\n", |
1284 node->name, node->file, (node->lno + 63) / 64); | 1284 node->name, node->file, (node->lno + 63) / 64); |
1285 else | 1285 else |
1286 fprintf (stdout, "%-16s%4d %-16s %s\n", | 1286 fprintf (stdout, "%-16s %3d %-16s %s\n", |
1287 node->name, node->lno, node->file, node->pat); | 1287 node->name, node->lno, node->file, node->pat); |
1288 | 1288 |
1289 /* Output subentries that follow this one */ | 1289 /* Output subentries that follow this one */ |
1290 put_entries (node->right); | 1290 put_entries (node->right); |
1291 } | 1291 } |
1466 } | 1466 } |
1467 else if (inquote) | 1467 else if (inquote) |
1468 { | 1468 { |
1469 if (c == '"') | 1469 if (c == '"') |
1470 inquote = FALSE; | 1470 inquote = FALSE; |
1471 continue; | 1471 else if (c == '\\') |
1472 c = *lp++; | |
1472 } | 1473 } |
1473 else if (inchar) | 1474 else if (inchar) |
1474 { | 1475 { |
1475 if (c == '\'') | 1476 if (c == '\'') |
1476 inchar = FALSE; | 1477 inchar = FALSE; |
1491 lp++; | 1492 lp++; |
1492 incomm = TRUE; | 1493 incomm = TRUE; |
1493 } | 1494 } |
1494 else if (c_ext && *lp == '/') | 1495 else if (c_ext && *lp == '/') |
1495 { | 1496 { |
1496 c = 0; /* C++ comment: skip rest of line */ | 1497 c = 0; |
1498 break; | |
1497 } | 1499 } |
1498 continue; | 1500 continue; |
1499 case '#': | 1501 case '#': |
1500 if (lp == lb.buffer + 1 && definedef == dnone) | 1502 if (lp == lb.buffer + 1 && definedef == dnone) |
1501 definedef = dsharpseen; | 1503 definedef = dsharpseen; |
1884 goto goodone; | 1886 goto goodone; |
1885 } | 1887 } |
1886 /* Detect GNUmacs's function-defining macros. */ | 1888 /* Detect GNUmacs's function-defining macros. */ |
1887 if (definedef == dnone) | 1889 if (definedef == dnone) |
1888 { | 1890 { |
1889 if (strneq (tokp->p, "DEF", 3)) | 1891 if (strneq (tokp->p, "DEF", 3) |
1892 || strneq (tokp->p, "ENTRY", 5) | |
1893 || strneq (tokp->p, "SYSCALL", 7) | |
1894 || strneq (tokp->p, "PSEUDO", 6)) | |
1890 { | 1895 { |
1891 next_token_is_func = TRUE; | 1896 next_token_is_func = TRUE; |
1892 goto badone; | 1897 goto badone; |
1893 } | 1898 } |
1894 else if (strneq (tokp->p, "EXFUN", 5)) | 1899 else if (strneq (tokp->p, "EXFUN", 5)) |
2082 char c; | 2087 char c; |
2083 char nambuf[BUFSIZ]; | 2088 char nambuf[BUFSIZ]; |
2084 | 2089 |
2085 while (isspace (*dbp)) | 2090 while (isspace (*dbp)) |
2086 dbp++; | 2091 dbp++; |
2087 if (*dbp == 0 || (!isalpha (*dbp)) && (*dbp != '_') && (*dbp != '$')) | 2092 if (*dbp == 0 |
2093 || (!isalpha (*dbp) | |
2094 && *dbp != '_' | |
2095 && *dbp != '$')) | |
2088 return; | 2096 return; |
2089 for (cp = dbp + 1; *cp && (isalpha (*cp) || isdigit (*cp) | 2097 for (cp = dbp + 1; *cp && (isalpha (*cp) || isdigit (*cp) |
2090 || (*cp == '_') || (*cp == '$')); cp++) | 2098 || (*cp == '_') || (*cp == '$')); cp++) |
2091 continue; | 2099 continue; |
2092 c = cp[0]; | 2100 c = cp[0]; |