Mercurial > hg > xemacs-beta
changeset 2554:94f848eb8e4b
[xemacs-hg @ 2005-02-03 18:09:26 by james]
Update to Francesco's 17.11 release. See xemacs-patches message with ID
<psvf99cy99.fsf@diannao.ittc.ku.edu>.
author | james |
---|---|
date | Thu, 03 Feb 2005 18:09:30 +0000 |
parents | b880fa9b5d8a |
children | c69008aaa9bc |
files | etc/ChangeLog etc/ETAGS.EBNF lib-src/ChangeLog lib-src/etags.c |
diffstat | 4 files changed, 76 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/ChangeLog Thu Feb 03 17:34:03 2005 +0000 +++ b/etc/ChangeLog Thu Feb 03 18:09:30 2005 +0000 @@ -1,3 +1,7 @@ +2005-02-03 Jerry James <james@xemacs.org> + + * ETAGS.EBNF: Update to author version 17.11. + 2005-01-31 Ben Wing <ben@xemacs.org> Delete stuff that is irrelevant, mislocated or woefully out-of-date.
--- a/etc/ETAGS.EBNF Thu Feb 03 17:34:03 2005 +0000 +++ b/etc/ETAGS.EBNF Thu Feb 03 18:09:30 2005 +0000 @@ -2,7 +2,7 @@ This file contains two sections: -1) An EBNF (Extended Backus Normal Form) description of the format of +1) An EBNF (Extended Backus-Naur Form) description of the format of the tags file created by etags.c and interpreted by etags.el; 2) A discussion of tag names and implicit tag names.
--- a/lib-src/ChangeLog Thu Feb 03 17:34:03 2005 +0000 +++ b/lib-src/ChangeLog Thu Feb 03 18:09:30 2005 +0000 @@ -1,3 +1,7 @@ +2005-02-03 Jerry James <james@xemacs.org> + + * etags.c: Update to author version 17.11. + 2005-01-26 Ben Wing <ben@xemacs.org> * fakemail.c (main): Add args to fix warning.
--- a/lib-src/etags.c Thu Feb 03 17:34:03 2005 +0000 +++ b/lib-src/etags.c Thu Feb 03 18:09:30 2005 +0000 @@ -1,5 +1,5 @@ /* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*- - Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2001, 2002 + Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2004 Free Software Foundation, Inc. and Ken Arnold This file is not considered part of GNU Emacs. @@ -40,7 +40,7 @@ * configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 17.6"; +char pot_etags_version[] = "@(#) pot revision number is 17.11"; #define TRUE 1 #define FALSE 0 @@ -342,6 +342,7 @@ static void Cplusplus_entries __P((FILE *)); static void Cstar_entries __P((FILE *)); static void Erlang_functions __P((FILE *)); +static void Forth_words __P((FILE *)); static void Fortran_functions __P((FILE *)); static void HTML_labels __P((FILE *)); static void Lisp_functions __P((FILE *)); @@ -630,6 +631,12 @@ "In Erlang code, the tags are the functions, records and macros\n\ defined in the file."; +char *Forth_suffixes [] = + { "fth", "tok", NULL }; +static char Forth_help [] = +"In Forth code, tags are words defined by `:',\n\ +constant, code, create, defer, value, variable, buffer:, field."; + static char *Fortran_suffixes [] = { "F", "f", "f90", "for", NULL }; static char Fortran_help [] = @@ -777,6 +784,7 @@ { "c*", no_lang_help, Cstar_entries, Cstar_suffixes }, { "cobol", Cobol_help, Cobol_paragraphs, Cobol_suffixes }, { "erlang", Erlang_help, Erlang_functions, Erlang_suffixes }, + { "forth", Forth_help, Forth_words, Forth_suffixes }, { "fortran", Fortran_help, Fortran_functions, Fortran_suffixes }, { "html", HTML_help, HTML_labels, HTML_suffixes }, { "java", Cjava_help, Cjava_entries, Cjava_suffixes }, @@ -1179,12 +1187,14 @@ globals = TRUE; } + /* When the optstring begins with a '-' getopt_long does not rearrange the + non-options arguments to be at the end, but leaves them alone. */ optstring = "-"; #ifdef ETAGS_REGEXPS optstring = "-r:Rc:"; #endif /* ETAGS_REGEXPS */ - if (LONG_OPTIONS) - optstring += 1; + if (!LONG_OPTIONS) + optstring += 1; /* remove the initial '-' */ optstring = concat (optstring, "Cf:Il:o:SVhH", (CTAGS) ? "BxdtTuvw" : "aDi:"); @@ -1284,6 +1294,7 @@ /* NOTREACHED */ } + /* No more options. Store the rest of arguments. */ for (; optind < argc; optind++) { argbuffer[current_arg].arg_type = at_filename; @@ -4074,10 +4085,18 @@ char_pointer = line_buffer.buffer, \ TRUE); \ ) -#define LOOKING_AT(cp, keyword) /* keyword is a constant string */ \ - (strneq ((cp), keyword, sizeof(keyword)-1) /* cp points at keyword */ \ - && notinname ((cp)[sizeof(keyword)-1]) /* end of keyword */ \ - && ((cp) = skip_spaces((cp)+sizeof(keyword)-1))) /* skip spaces */ + +#define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \ + ((assert("" kw), TRUE) /* syntax error if not a literal string */ \ + && strneq ((cp), kw, sizeof(kw)-1) /* cp points at kw */ \ + && notinname ((cp)[sizeof(kw)-1]) /* end of kw */ \ + && ((cp) = skip_spaces((cp)+sizeof(kw)-1))) /* skip spaces */ + +/* Similar to LOOKING_AT but does not use notinname, does not skip */ +#define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \ + ((assert("" kw), TRUE) /* syntax error if not a literal string */ \ + && strncaseeq ((cp), kw, sizeof(kw)-1) /* cp points at kw */ \ + && ((cp) += sizeof(kw)-1)) /* skip spaces */ /* * Read a file, but do no processing. This is used to do regexp @@ -4955,7 +4974,7 @@ /* - * Postscript tag functions + * Postscript tags * Just look for lines where the first character is '/' * Also look at "defineps" for PSWrap * Ideas by: @@ -4986,6 +5005,43 @@ /* + * Forth tags + * Ignore anything after \ followed by space or in ( ) + * Look for words defined by : + * Look for constant, code, create, defer, value, and variable + * OBP extensions: Look for buffer:, field, + * Ideas by Eduardo Horvath <eeh@netbsd.org> (2004) + */ +static void +Forth_words (inf) + FILE *inf; +{ + register char *bp; + + LOOP_ON_INPUT_LINES (inf, lb, bp) + while ((bp = skip_spaces (bp))[0] != '\0') + if (bp[0] == '\\' && iswhite(bp[1])) + break; /* read next line */ + else if (bp[0] == '(' && iswhite(bp[1])) + do /* skip to ) or eol */ + bp++; + while (*bp != ')' && *bp != '\0'); + else if ((bp[0] == ':' && iswhite(bp[1]) && bp++) + || LOOKING_AT_NOCASE (bp, "constant") + || LOOKING_AT_NOCASE (bp, "code") + || LOOKING_AT_NOCASE (bp, "create") + || LOOKING_AT_NOCASE (bp, "defer") + || LOOKING_AT_NOCASE (bp, "value") + || LOOKING_AT_NOCASE (bp, "variable") + || LOOKING_AT_NOCASE (bp, "buffer:") + || LOOKING_AT_NOCASE (bp, "field")) + get_tag (skip_spaces (bp), NULL); /* Yay! A definition! */ + else + bp = skip_non_spaces (bp); +} + + +/* * Scheme tag functions * look for (def... xyzzy * (def... (xyzzy @@ -4993,7 +5049,6 @@ * (set! xyzzy * Original code by Ken Haase (1985?) */ - static void Scheme_functions (inf) FILE *inf; @@ -5212,11 +5267,6 @@ } -/* Similar to LOOKING_AT but does not use notinname, does not skip */ -#define LOOKING_AT_NOCASE(cp, kw) /* kw is a constant string */ \ - (strncaseeq ((cp), kw, sizeof(kw)-1) /* cp points at kw */ \ - && ((cp) += sizeof(kw)-1)) /* skip spaces */ - /* * HTML support. * Contents of <title>, <h1>, <h2>, <h3> are tags. @@ -6501,7 +6551,7 @@ : *s1 - *s2); } -/* Skip spaces, return new pointer. */ +/* Skip spaces (end of string is not space), return new pointer. */ static char * skip_spaces (cp) char *cp; @@ -6511,7 +6561,7 @@ return cp; } -/* Skip non spaces, return new pointer. */ +/* Skip non spaces, except end of string, return new pointer. */ static char * skip_non_spaces (cp) char *cp;