From 207f8eeb2fcd56c1616d06ce4ade5ea5ee6a08d5 Mon Sep 17 00:00:00 2001 From: Craig Burley Date: Sat, 29 May 1999 22:35:32 +0000 Subject: code git-svn-id: https://gcc.gnu.org/svn/gcc/branches/g77-0_6-branch@27241 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/f/lex.def | 130 +++++++++++++++++++ gcc/f/where.c | 392 ++-------------------------------------------------------- gcc/f/where.h | 170 ++++++++++--------------- 3 files changed, 203 insertions(+), 489 deletions(-) create mode 100644 gcc/f/lex.def diff --git a/gcc/f/lex.def b/gcc/f/lex.def new file mode 100644 index 00000000000..c14086104b2 --- /dev/null +++ b/gcc/f/lex.def @@ -0,0 +1,130 @@ +/* lex.def + Copyright (C) 1999 Free Software Foundation, Inc. + Contributed by James Craig Burley. + +This file is part of GNU Fortran. + +GNU Fortran is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Fortran is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Fortran; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +/* No lexeme. */ +DEFLEX ('0', FFELEX_NONE) + +/* Beginning of Fortran statement. Always ended by EOS, with no + intervening BOS. Outside of BOS/EOS pairs, lexemes should be + ignored. */ +DEFLEX ('1', FFELEX_BOS) + +/* End of Fortran statement. */ +DEFLEX ('2', FFELEX_EOS) + +/* Double-quote. Usually in pairs with intervening character + constant, but not always -- VXT syntax for octal integer constant + is, e.g., `"2000'. */ +DEFLEX ('\"', FFELEX_QUOTE) + +/* Dollar sign. Optionally permissible within NAME. */ +DEFLEX ('$', FFELEX_DOLLAR) + +/* Hash (pound) sign. */ +DEFLEX ('#', FFELEX_HASH) + +/* Percent sign. */ +DEFLEX ('%', FFELEX_PERCENT) + +/* Ampersand. Not made into a lexeme when it is a (free-form) + trailing or leading continuation indicator. */ +DEFLEX ('&', FFELEX_AMPERSAND) + +/* Apostrophe. Usually in pairs with intervening character + constant, but not always -- VXT supports "READ(1'10) ...". */ +DEFLEX ('\'', FFELEX_APOSTROPHE) + +/* Left (open) parenthese. */ +DEFLEX ('(', FFELEX_LPAREN) + +/* Right (close) parenthese. */ +DEFLEX (')', FFELEX_RPAREN) + +/* Star (asterisk). */ +DEFLEX ('*', FFELEX_STAR) + +/* Plus sign. */ +DEFLEX ('+', FFELEX_PLUS) + +/* Minus sign (dash, hyphen). */ +DEFLEX ('-', FFELEX_MINUS) + +/* Dot (period). */ +DEFLEX ('.', FFELEX_DOT) + +/* Slash (forward slash). */ +DEFLEX ('/', FFELEX_SLASH) + +/* Less-than (open angle). */ +DEFLEX ('<', FFELEX_LESS) + +/* Greater-than (close angle), called "more" for brevity. */ +DEFLEX ('>', FFELEX_MORE) + +/* Equal sign. */ +DEFLEX ('=', FFELEX_EQUAL) + +/* Comma. */ +DEFLEX (',', FFELEX_COMMA) + +/* Colon. */ +DEFLEX (':', FFELEX_COLON) + +/* Semicolon. */ +DEFLEX (';', FFELEX_SEMI) + +/* Underscore (called "line" for brevity). */ +DEFLEX ('_', FFELEX_LINE) + +/* Question mark. */ +DEFLEX ('?', FFELEX_QUESTION) + +/* Left (open) bracket. */ +DEFLEX ('[', FFELEX_LBRACKET) + +/* Right (close) bracket. */ +DEFLEX (']', FFELEX_RBRACKET) + + +/* Multi-character lexemes: */ + +/* Decimal digits (regexp: `[0-9]+'). */ +DEFLEX_MULTI ('0', FFELEX_NUMBER) + +/* Name (regexp: `[A-Za-z][A-Za-z0-9_]*' or `[A-Za-z][A-Za-z0-9_$]*', + depending on `-fdollar-ok' option). */ +DEFLEX_MULTI ('A', FFELEX_NAME) + +/* Character constant (excluding quotes, which are separate lexemes). */ +DEFLEX_MULTI ('a', FFELEX_CONST) + +/* Hollerith constant (excluding `H'). */ +DEFLEX_MULTI ('H', FFELEX_HOLLERITH) + +/* Commentary between distinct lexemes. (Commentary within a lexeme + is handled separately.) Not currently implemented. */ +DEFLEX_MULTI ('!', FFELEX_COMMENT) + + +/* Diagnostic lexemes: */ + +/* Something was wrong here. */ +DEFLEX_DIAG ('b', FFELEX_something?) diff --git a/gcc/f/where.c b/gcc/f/where.c index 2792899d410..40d4c9e808e 100644 --- a/gcc/f/where.c +++ b/gcc/f/where.c @@ -1,5 +1,5 @@ -/* where.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. +/* where.c + Copyright (C) 1995, 1999 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -17,48 +17,26 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Fortran; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - - Description: - Simple data abstraction for Fortran source lines (called card images). - - Modifications: -*/ - -/* Include files. */ +02111-1307, USA. */ #include "proj.h" #include "where.h" #include "lex.h" #include "malloc.h" -/* Externals defined here. */ - -struct _ffewhere_line_ ffewhere_unknown_line_ -= -{NULL, NULL, 0, 0, 0, {0}}; - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - typedef struct _ffewhere_ll_ *ffewhereLL_; -/* Private include files. */ - - -/* Internal structure definitions. */ - struct _ffewhere_ll_ { ffewhereLL_ next; ffewhereLL_ previous; ffewhereFile wf; - ffewhereLineNumber line_no; /* ffelex_line_number() at time of creation. */ - ffewhereLineNumber offset; /* User-desired offset (usually 1). */ + + /* ffelex_line_number() at time of creation. */ + ffewhereLine line_no; + + /* User-desired offset (usually 1). */ + ffewhereLine offset; }; struct _ffewhere_root_ll_ @@ -67,25 +45,10 @@ struct _ffewhere_root_ll_ ffewhereLL_ last; }; -struct _ffewhere_root_line_ - { - ffewhereLine first; - ffewhereLine last; - ffewhereLineNumber none; - }; - -/* Static objects accessed by functions in this module. */ - static struct _ffewhere_root_ll_ ffewhere_root_ll_; -static struct _ffewhere_root_line_ ffewhere_root_line_; - -/* Static functions (internal). */ static ffewhereLL_ ffewhere_ll_lookup_ (ffewhereLineNumber ln); - -/* Internal macros. */ - /* Look up line-to-line object from absolute line num. */ static ffewhereLL_ @@ -178,25 +141,12 @@ ffewhere_file_set (ffewhereFile wf, bool have_num, ffewhereLineNumber ln) /* Do initializations. */ void -ffewhere_init_1 () +ffewhere_initialize () { - ffewhere_root_line_.first = ffewhere_root_line_.last - = (ffewhereLine) &ffewhere_root_line_.first; - ffewhere_root_line_.none = 0; - ffewhere_root_ll_.first = ffewhere_root_ll_.last = (ffewhereLL_) &ffewhere_root_ll_.first; } -/* Return the textual content of the line. */ - -char * -ffewhere_line_content (ffewhereLine wl) -{ - assert (wl != NULL); - return wl->content; -} - /* Look up file object from line object. */ ffewhereFile @@ -209,7 +159,7 @@ ffewhere_line_file (ffewhereLine wl) return ll->wf; } -/* Lookup file object from line object, calc line#. */ +/* Lookup file object from line object, return line number. */ ffewhereLineNumber ffewhere_line_filelinenum (ffewhereLine wl) @@ -220,323 +170,3 @@ ffewhere_line_filelinenum (ffewhereLine wl) ll = ffewhere_ll_lookup_ (wl->line_num); return wl->line_num + ll->offset - ll->line_no; } - -/* Decrement use count for line, deallocate if no uses left. */ - -void -ffewhere_line_kill (ffewhereLine wl) -{ -#if 0 - if (!ffewhere_line_is_unknown (wl)) - fprintf (dmpout, "; ffewhere_line_kill %" ffewhereLineNumber_f "u, uses=%" - ffewhereUses_f_ "u\n", - wl->line_num, wl->uses); -#endif - assert (ffewhere_line_is_unknown (wl) || (wl->uses != 0)); - if (!ffewhere_line_is_unknown (wl) && (--wl->uses == 0)) - { - wl->previous->next = wl->next; - wl->next->previous = wl->previous; - malloc_kill_ks (ffe_pool_file (), wl, - offsetof (struct _ffewhere_line_, content) - + wl->length + 1); - } -} - -/* Make a new line or increment use count of existing one. - - Find out where line object is, if anywhere. If in lexer, it might also - be at the end of the list of lines, else put it on the end of the list. - Then, if in the list of lines, increment the use count and return the - line object. Else, make an empty line object (no line) and return - that. */ - -ffewhereLine -ffewhere_line_new (ffewhereLineNumber ln) -{ - ffewhereLine wl = ffewhere_root_line_.last; - - /* If this is the lexer's current line, see if it is already at the end of - the list, and if not, make it and return it. */ - - if (((ln == 0) /* Presumably asking for EOF pointer. */ - || (wl->line_num != ln)) - && (ffelex_line_number () == ln)) - { -#if 0 - fprintf (dmpout, - "; ffewhere_line_new %" ffewhereLineNumber_f "u, lexer\n", - ln); -#endif - wl = malloc_new_ks (ffe_pool_file (), "FFEWHERE line", - offsetof (struct _ffewhere_line_, content) - + (size_t) ffelex_line_length () + 1); - wl->next = (ffewhereLine) &ffewhere_root_line_; - wl->previous = ffewhere_root_line_.last; - wl->previous->next = wl; - wl->next->previous = wl; - wl->line_num = ln; - wl->uses = 1; - wl->length = ffelex_line_length (); - strcpy (wl->content, ffelex_line ()); - return wl; - } - - /* See if line is on list already. */ - - while (wl->line_num > ln) - wl = wl->previous; - - /* If line is there, increment its use count and return. */ - - if (wl->line_num == ln) - { -#if 0 - fprintf (dmpout, "; ffewhere_line_new %" ffewhereLineNumber_f "u, uses=%" - ffewhereUses_f_ "u\n", ln, - wl->uses); -#endif - wl->uses++; - return wl; - } - - /* Else, make a new one with a blank line (since we've obviously lost it, - which should never happen) and return it. */ - - fprintf (stderr, - "(Cannot resurrect line %lu for error reporting purposes.)\n", - ln); - - wl = malloc_new_ks (ffe_pool_file (), "FFEWHERE line", - offsetof (struct _ffewhere_line_, content) - + 1); - wl->next = (ffewhereLine) &ffewhere_root_line_; - wl->previous = ffewhere_root_line_.last; - wl->previous->next = wl; - wl->next->previous = wl; - wl->line_num = ln; - wl->uses = 1; - wl->length = 0; - *(wl->content) = '\0'; - return wl; -} - -/* Increment use count of line, as in a copy. */ - -ffewhereLine -ffewhere_line_use (ffewhereLine wl) -{ -#if 0 - fprintf (dmpout, "; ffewhere_line_use %" ffewhereLineNumber_f "u, uses=%" ffewhereUses_f_ - "u\n", wl->line_num, wl->uses); -#endif - assert (ffewhere_line_is_unknown (wl) || (wl->uses != 0)); - if (!ffewhere_line_is_unknown (wl)) - ++wl->uses; - return wl; -} - -/* Set an ffewhere object based on a track index. - - Determines the absolute line and column number of a character at a given - index into an ffewhereTrack array. wr* is the reference position, wt is - the tracking information, and i is the index desired. wo* is set to wr* - plus the continual offsets described by wt[0...i-1], or unknown if any of - the continual offsets are not known. */ - -void -ffewhere_set_from_track (ffewhereLine *wol, ffewhereColumn *woc, - ffewhereLine wrl, ffewhereColumn wrc, - ffewhereTrack wt, ffewhereIndex i) -{ - ffewhereLineNumber ln; - ffewhereColumnNumber cn; - ffewhereIndex j; - ffewhereIndex k; - - if ((i == 0) || (i >= FFEWHERE_indexMAX)) - { - *wol = ffewhere_line_use (wrl); - *woc = ffewhere_column_use (wrc); - } - else - { - ln = ffewhere_line_number (wrl); - cn = ffewhere_column_number (wrc); - for (j = 0, k = 0; j < i; ++j, k += 2) - { - if ((wt[k] == FFEWHERE_indexUNKNOWN) - || (wt[k + 1] == FFEWHERE_indexUNKNOWN)) - { - *wol = ffewhere_line_unknown (); - *woc = ffewhere_column_unknown (); - return; - } - if (wt[k] == 0) - cn += wt[k + 1] + 1; - else - { - ln += wt[k]; - cn = wt[k + 1] + 1; - } - } - if (ln == ffewhere_line_number (wrl)) - { /* Already have the line object, just use it - directly. */ - *wol = ffewhere_line_use (wrl); - } - else /* Must search for the line object. */ - *wol = ffewhere_line_new (ln); - *woc = ffewhere_column_new (cn); - } -} - -/* Build next tracking index. - - Set wt[i-1] continual offset so that it offsets from w* to (ln,cn). Update - w* to contain (ln,cn). DO NOT call this routine if i >= FFEWHERE_indexMAX - or i == 0. */ - -void -ffewhere_track (ffewhereLine *wl, ffewhereColumn *wc, ffewhereTrack wt, - ffewhereIndex i, ffewhereLineNumber ln, - ffewhereColumnNumber cn) -{ - unsigned int lo; - unsigned int co; - - if ((ffewhere_line_is_unknown (*wl)) - || (ffewhere_column_is_unknown (*wc)) - || ((lo = ln - ffewhere_line_number (*wl)) >= FFEWHERE_indexUNKNOWN)) - { - wt[i * 2 - 2] = wt[i * 2 - 1] = FFEWHERE_indexUNKNOWN; - ffewhere_line_kill (*wl); - ffewhere_column_kill (*wc); - *wl = FFEWHERE_lineUNKNOWN; - *wc = FFEWHERE_columnUNKNOWN; - } - else if (lo == 0) - { - wt[i * 2 - 2] = 0; - if ((co = cn - ffewhere_column_number (*wc)) > FFEWHERE_indexUNKNOWN) - { - wt[i * 2 - 1] = FFEWHERE_indexUNKNOWN; - ffewhere_line_kill (*wl); - ffewhere_column_kill (*wc); - *wl = FFEWHERE_lineUNKNOWN; - *wc = FFEWHERE_columnUNKNOWN; - } - else - { - wt[i * 2 - 1] = co - 1; - ffewhere_column_kill (*wc); - *wc = ffewhere_column_use (ffewhere_column_new (cn)); - } - } - else - { - wt[i * 2 - 2] = lo; - if (cn > FFEWHERE_indexUNKNOWN) - { - wt[i * 2 - 1] = FFEWHERE_indexUNKNOWN; - ffewhere_line_kill (*wl); - ffewhere_column_kill (*wc); - *wl = ffewhere_line_unknown (); - *wc = ffewhere_column_unknown (); - } - else - { - wt[i * 2 - 1] = cn - 1; - ffewhere_line_kill (*wl); - ffewhere_column_kill (*wc); - *wl = ffewhere_line_use (ffewhere_line_new (ln)); - *wc = ffewhere_column_use (ffewhere_column_new (cn)); - } - } -} - -/* Clear tracking index for internally created track. - - Set the tracking information to indicate that the tracking is at its - simplest (no spaces or newlines within the tracking). This means set - everything to zero in the current implementation. Length is the total - length of the token; length must be 2 or greater, since length-1 tracking - characters are set. */ - -void -ffewhere_track_clear (ffewhereTrack wt, ffewhereIndex length) -{ - ffewhereIndex i; - - if (length > FFEWHERE_indexMAX) - length = FFEWHERE_indexMAX; - - for (i = 1; i < length; ++i) - wt[i * 2 - 2] = wt[i * 2 - 1] = 0; -} - -/* Copy tracking index from one place to another. - - Copy tracking information from swt[start] to dwt[0] and so on, presumably - after an ffewhere_set_from_track call. Length is the total - length of the token; length must be 2 or greater, since length-1 tracking - characters are set. */ - -void -ffewhere_track_copy (ffewhereTrack dwt, ffewhereTrack swt, ffewhereIndex start, - ffewhereIndex length) -{ - ffewhereIndex i; - ffewhereIndex copy; - - if (length > FFEWHERE_indexMAX) - length = FFEWHERE_indexMAX; - - if (length + start > FFEWHERE_indexMAX) - copy = FFEWHERE_indexMAX - start; - else - copy = length; - - for (i = 1; i < copy; ++i) - { - dwt[i * 2 - 2] = swt[(i + start) * 2 - 2]; - dwt[i * 2 - 1] = swt[(i + start) * 2 - 1]; - } - - for (; i < length; ++i) - { - dwt[i * 2 - 2] = 0; - dwt[i * 2 - 1] = 0; - } -} - -/* Kill tracking data. - - Kill all the tracking information by killing incremented lines from the - first line number. */ - -void -ffewhere_track_kill (ffewhereLine wrl, ffewhereColumn wrc UNUSED, - ffewhereTrack wt, ffewhereIndex length) -{ - ffewhereLineNumber ln; - unsigned int lo; - ffewhereIndex i; - - ln = ffewhere_line_number (wrl); - - if (length > FFEWHERE_indexMAX) - length = FFEWHERE_indexMAX; - - for (i = 0; i < length - 1; ++i) - { - if ((lo = wt[i * 2]) == FFEWHERE_indexUNKNOWN) - break; - else if (lo != 0) - { - ln += lo; - wrl = ffewhere_line_new (ln); - ffewhere_line_kill (wrl); - } - } -} diff --git a/gcc/f/where.h b/gcc/f/where.h index 32b3d4b224d..f024ab06bad 100644 --- a/gcc/f/where.h +++ b/gcc/f/where.h @@ -1,5 +1,5 @@ -/* where.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. +/* where.h + Copyright (C) 1995, 1999 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -17,122 +17,76 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Fortran; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - where.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ +02111-1307, USA. */ #ifndef _H_f_where #define _H_f_where -/* Simple definitions and enumerations. */ - -#define FFEWHERE_columnMAX UCHAR_MAX -#define FFEWHERE_columnUNKNOWN 0 -#define FFEWHERE_indexMAX 36 -#define FFEWHERE_indexUNKNOWN UCHAR_MAX -#define FFEWHERE_lineMAX ULONG_MAX -#define FFEWHERE_lineUNKNOWN (&ffewhere_unknown_line_) -#define FFEWHERE_filenameUNKNOWN ("(input file)") - -/* Typedefs. */ - -typedef unsigned char ffewhereColumnNumber; /* Change FFEWHERE_columnMAX - too. */ -#define ffewhereColumnNumber_f "" -typedef unsigned char ffewhereColumn; -typedef struct _ffewhere_file_ *ffewhereFile; -typedef unsigned short ffewhereLength_; -#define ffewhereLength_f_ "" -typedef unsigned long ffewhereLineNumber; /* Change FFEWHERE_lineMAX - too. */ -#define ffewhereLineNumber_f "l" -typedef struct _ffewhere_line_ *ffewhereLine; -typedef unsigned char ffewhereIndex; -#define ffewhereIndex_f "" -typedef ffewhereIndex ffewhereTrack[FFEWHERE_indexMAX * 2 - 2]; -typedef unsigned int ffewhereUses_; -#define ffewhereUses_f_ "" - -/* Include files needed by this one. */ - #include "glimits.j" #include "top.h" -/* Structure definitions. */ - -struct _ffewhere_file_ - { - size_t length; - char text[1]; - }; - -struct _ffewhere_line_ - { - ffewhereLine next; - ffewhereLine previous; - ffewhereLineNumber line_num; - ffewhereUses_ uses; - ffewhereLength_ length; - char content[1]; - }; +#define FFEWHERE_nameUNKNOWN ("(input file)") + +/* Line number within all the source code read (in order) + during lexing. Starts with 1 for first line. */ +typedef unsigned long ffewhereLine; +#define ffewhereLine_f "l" +#define FFEWHERE_lineNONE 0 +#define FFEWHERE_lineMAX (ULONG_MAX >> CHAR_BIT) + +/* Column number within line. Starts with 1 for first column. */ +typedef unsigned char ffewhereCol; +#define ffewhereCol_f "" +#define FFEWHERE_colNONE 0 +#define FFEWHERE_colMAX UCHAR_MAX + +typedef unsigned long int ffewhere; + +typdef struct _ffewhere_file_ +{ + size_t ffewhere_file_length_; + char ffewhere_file_text_[1]; +} *ffewhereFile; + +typedef struct _ffewhere_incl_ +{ + /* The file that was included. (Might be included more than once, + so track its name info separately.) */ + ffewhereFile ffewhere_incl_file_; + + /* ffelex_line_number() at time of creation. */ + ffewhereLine ffewhere_incl_line_; + + /* User-desired offset (usually 1). */ + ffewhereLine ffewhere_incl_offset_; +} *ffewhereIncl; + +extern inline ffewhere +ffewhere_new (ffewhereLine l, ffewhereCol c) +{ + if (l > FFEWHERE_lineMAX) + l = FFEWHERE_lineMAX; + if (c > FFEWHERE_colMAX) + c = FFEWHERE_colMAX; + return (l << CHAR_BIT) | c; +} + +#define ffewhere_line(w) ((w) >> CHAR_BIT) +#define ffewhere_col(w) ((w) & UCHAR_MAX) + +#define ffewhere_file_name(f) ((f)->ffewhere_file_text_) +#define ffewhere_file_namelen(f) ((f)->ffewhere_file_length_) +ffewhereFile ffewhere_file_new (char *name, size_t length); +void ffewhere_file_set (ffewhereFile wf, bool have_num, ffewhereLineNumber ln); -/* Global objects accessed by users of this module. */ +ffewhereIncl ffewhere_incl_line (ffewhereLine l); -extern struct _ffewhere_line_ ffewhere_unknown_line_; +void ffewhere_initialize (void); -/* Declare functions with prototypes. */ +#define ffewhere_line_file(l) ffewhere_file_incl (ffewhere_incl_line ((l))) +#define ffewhere_line_filelinenum(l) \ + ffewhere_line_incl (ffewhere_incl_line ((l))) -void ffewhere_file_kill (ffewhereFile wf); -ffewhereFile ffewhere_file_new (char *name, size_t length); -void ffewhere_file_set (ffewhereFile wf, bool have_num, ffewhereLineNumber ln); -void ffewhere_init_1 (void); -char *ffewhere_line_content (ffewhereLine l); -ffewhereFile ffewhere_line_file (ffewhereLine l); -ffewhereLineNumber ffewhere_line_filelinenum (ffewhereLine l); -void ffewhere_line_kill (ffewhereLine l); -ffewhereLine ffewhere_line_new (ffewhereLineNumber ln); -ffewhereLine ffewhere_line_use (ffewhereLine wl); -void ffewhere_set_from_track (ffewhereLine *wol, ffewhereColumn *woc, - ffewhereLine wrl, ffewhereColumn wrc, ffewhereTrack wt, - ffewhereIndex i); -void ffewhere_track (ffewhereLine *wl, ffewhereColumn *wc, ffewhereTrack wt, - ffewhereIndex i, ffewhereLineNumber ln, ffewhereColumnNumber cn); -void ffewhere_track_clear (ffewhereTrack wt, ffewhereIndex length); -void ffewhere_track_copy (ffewhereTrack dwt, ffewhereTrack swt, - ffewhereIndex start, ffewhereIndex length); -void ffewhere_track_kill (ffewhereLine wrl, ffewhereColumn wrc, ffewhereTrack wt, - ffewhereIndex length); - -/* Define macros. */ - -#define ffewhere_column_is_unknown(c) (c == FFEWHERE_columnUNKNOWN) -#define ffewhere_column_kill(c) ((void) 0) -#define ffewhere_column_new(cn) (cn) -#define ffewhere_column_number(c) (c) -#define ffewhere_column_unknown() (FFEWHERE_columnUNKNOWN) -#define ffewhere_column_use(c) (c) -#define ffewhere_file_name(f) ((f)->text) -#define ffewhere_file_namelen(f) ((f)->length) -#define ffewhere_init_0() -#define ffewhere_init_2() -#define ffewhere_init_3() -#define ffewhere_init_4() -#define ffewhere_line_filename(l) (ffewhere_line_file(l)->text) -#define ffewhere_line_is_unknown(l) (l == FFEWHERE_lineUNKNOWN) -#define ffewhere_line_number(l) ((l)->line_num) -#define ffewhere_line_unknown() (FFEWHERE_lineUNKNOWN) -#define ffewhere_terminate_0() -#define ffewhere_terminate_1() -#define ffewhere_terminate_2() -#define ffewhere_terminate_3() -#define ffewhere_terminate_4() - -/* End of #include file. */ +#define ffewhere_terminate() #endif -- cgit v1.2.3