Page MenuHomeSoftware Heritage

No OneTemporary

diff --git a/NEWS b/NEWS
index 433456d0..65597eb8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,646 +1,648 @@
Current Version: @@VERSION@@
-ctags-5.3 (Wed Jul 10 2002)
+ctags-5.3 (Mon Jul 15 2002)
* Allowed --etags-include option without input files.
* Changed Asm parser to back to C-based parser to remove redundant tags,
and extending its support for more variants [Asm].
* Changed to using _tempnam() to create temporary files on Windows, allowing
"TMP" environment variable to set temporary directory.
* Changed the -x output to match that of traditional ctags when the --format=1
option is supplied. The new format was also changed slightly to conform more
closely to the original format, with the addition of the extra tag type field.
* Added support for Verilog language, submitted by Nam SungHyun.
* Added support for RISC OS platform, contributed by Andrew Wingate.
* Added support for "#pragma weak", generating macro tags for weak symbols [C].
* Added support for mixins and class methods to Ruby parser, submitted by
Matthias Veit [Ruby].
* Added support to ctags and readtags library for case-folded sorting of tag
files, submitted by Flemming Madsen.
* Added identification of class methods [Python].
* Fixed portability problems [Bugs #541997, #571240].
* Fixed bug in configure script [Solaris, Bug #542966].
* Fixed invalid package name tags [Perl, Bug #535068].
+* Fixed failure to output relative paths into etags TAGS files on Win32
+ [Bug #568365].
* Fixed incorrect line address in cases of line continuation [Fortran].
* Fixed missing tags for certain cases of invalid syntax [C].
* Fixed missing tags in Fortran with HPF extensions [Fortran, Bug #565813].
* Fixed spurious tag for clients portion of feature clause when following
an empty feature clause [Eiffel].
ctags-5.2.3 (Sun Feb 24 2002)
* Fixed portability problem in makefile [Solaris, FreeBSD].
* Fixed infinite loop for certain cases of invalid syntax [Eiffel].
* Changed Asm parser to regex, extending its support for more variants [Asm].
ctags-5.2.2 (Sat Feb 16 2002)
* Fixed spurious tags following empty feature clause [Eiffel].
* Fixed missing tags for classes specifying generic creation routine [Eiffel].
* Fixed missing tags when label not followed by white space [YACC].
* Fixed for portability [Solaris, MacOS X].
* Added support for type reference tool [Eiffel].
ctags-5.2.1 (Sun Jan 20 2002)
* Portability fixes [Mingw32].
* Added "RCS" and "CVS" to list of directories excluded by default.
* Fixed missing tags for function pointers declared const or volatile
[C, Bug #503764].
ctags-5.2 (Sun Dec 23 2001)
* Portability fixes [HP-UX, Solaris, VMS, OS/2].
* Made code compilable by a C++ compiler.
* Changed reading of option files to ignore blank lines.
* Changed and enhanced interface to readtags library (see readtags.h).
* Changed from using addLanguageRegex() to addTagRegex() in regex-based
parsers.
* Added support for Lua language, submitted by Max Ischenko.
* Added instructions to man page on using tags with NEdit.
* Added setargv.obj to link for wildcard expansion [MSVC].
* Added capability to have regex invoke a callback in a regex parser.
* Fixed regex tag problem which left newlines in back-references.
* Fixed missing class-qualified tags [Eiffel].
* Fixed spurious tags for entries in final indexing clause [Eiffel].
* Fixed problem with invalid filenames in preprocessor line directives.
* Fixed bug parsing scoped variables (e.g. "b:variable") [Vim, Bug #487608].
* Fixed problem compiling readtags.c on some hosts.
* Fixed memory overwrite problem in readtags library.
ctags-5.1 (Tue Nov 06 2001)
* Changed name of option configuration files for MSDOS, MSWindows, and OS/2.
* Changed regex support to enforce REG_NEWLINE. This fixes problem where the
newline character was explicity being matched by user patterns [Bug #431477].
* Added new public domain library for reading tag files (see readtags.h).
* Added support for variables and namespaces, provided by Jay Glanville [Vim].
* Added report of non-options in option configuration files and CTAGS
environment variable.
* Added support for YACC language, submitted by Nick Hibma [YACC].
* Added support for Perl packages, submitted by Nick Hibma [Perl].
* Added '$' as valid identifier character for DEC C compiler [VMS, Bug #425147].
* Added compilation date and time to --version output.
* Added configure check for HP-UX to determine if ANSI options needed [HP-UX].
* Removed tags for forward class/struct declarations [C/C++, Bug #432563].
* Eliminated ;" separator from end of tag line when no extension fields are
present.
* Fixed segmentation violation for some Lisp files [Lisp].
* Fixed segmentation violation occurring when file referenced in #line
directive was from an unknown language.
* Fixed loss of sync when parsing bit fields named with C++ reserved word [C].
* Fixed compilation problem on gcc-2.7.2.
* Fixed problem parsing verbatim strings [Eiffel].
* Fixed problem with PHP references [PHP].
* Fixed handling of Perl __DATA__ sections [Perl].
* Fixed problem resulting from white space in tag name due to regex name
specifier.
* Fixed double reading of $HOME/.ctags when current directory is $HOME.
* Fixed problem reading option configuration files using CR-LF newlines.
* Fixed problem preventing output control over tag kinds of regex patterns
[Bug #429869]
* Fixed incorrect parsing of Vim functions with ':' modifiers [Bug #466517].
ctags-5.0.1 (Sun Apr 15 2001)
* Fixed problem checking recursive links [SunOS 4.x].
* Improved security on hosts where mkstemp() is not available.
ctags-5.0 (Sun Mar 18 2001)
* Restructured code to simplify support for new language parsers.
* Changed source code to use ANSI-style function definitions.
* Changed scope-qualified tag entries to omit enumeration name [C/C++].
* Changed reading of files supplied to -I option to read one token per line.
* Changed reading of option files to read one argument per line.
* Changed default extension fields, now controlled by new option --fields.
* Changed detection of etags invocation to accept any name containing "etags".
* Removed -p option, which only caused confusion and is rendered obsolete by
the change immediately above.
* Removed 'A' flag to the --c-types, --eiffel-types, and --java-types
options, replacing its functionality with the new --fields option.
* Removed 'C' flag to the --c-types, --eiffel-types, and --java-types
options, replacing its functionality with the new --extra option.
* Deprecated -i option, which was long ago replaced with the --c-types option.
* Deprecated --file-tags option, now incorporated into new --extra option.
* Deprecated --kind-long option, now incorporated into new --fields option.
* Renamed --lang[uage] option to --language-force.
* Renamed makefiles for non-Unix platforms.
* Improved parsing of assembly language files [Asm].
* Improved parsing of Fortran language files, adding new tag kinds [Fortran].
* Added documentation explaining how to extend ctags with new parsers.
* Added support for regular expressions, using either Posix or Gnu interface.
* Added support for mapping file names to languages using shell patterns.
* Added support for ASP scripts, submitted by Patrick Dehne [ASP].
* Added support for Makefiles [Make].
* Added support for Pascal language [Pascal].
* Added support for PHP scripts, submitted by Jesus Castagnetto [PHP].
* Added support for REXX language [REXX], based on submission by Alexaner Mai.
* Added support for Ruby, submitted by Thaddeus Covert [Ruby].
* Added support for S-Lang, submitted by Francesc Rocher [SLang].
* Added support for Macintosh platform using MPW (by Maarten Hekkelman).
* Added .tk as recognized extension [Tcl].
* Added .cp and .hp as C++ extensions [C++].
* Added .zsh as shell script extension [Sh].
* Added support for trigraphs for C-based languages [C/C++].
* Added language recognition for shell scripts using "#!/usr/bin/env command".
* Added check for recursive directory links.
* Added support for "[" form of verbatim strings [Eiffel].
* Added --exclude option to exclude directories while recursing.
* Added --fields option to specify extension fields to include in output.
* Added --extra option to allow control over extra tags.
* Added --regex-<LANG> option to define language-specific regular expressions.
* Added --<LANG>-types options for all supported languages.
* Added --langdef option to define new languages to be parsed with regex.
* Added --languages option to restrict set of languages scanned for tags.
* Added --tag-relative option to make file paths recorded in tag file relative
to location of tag file itself instead of the current working directory when
file arguments are specified using relative paths.
* Added restriction of permissions of created temporary files when mkstemp()
is not available for security.
* Reimplemented line directive handling to work for all languages.
* Fixed tag generation for packages [Java].
* Fixed Lisp parser [Lisp].
* Fixed Mingw32 port [Win32].
* Fixed bug in procedure name parsing [Tcl].
* Fixed bug resulting in wrong column being checked for paragraphs [Cobol].
* Fixed bug in language dispatch for executable "#!" scripts [Unix].
* Fixed bugs resulting in incorrect scope entries in tag file [C++/Java].
* Fixed warning caused by reinstallation of etags link [Unix].
* Fixed destruction of existing tag file when no files supplied on invocation.
* Fixed problem in Makefile.in which prevented configuring and building in
non-source directory. Also changed Makefile.in to generate and use correct
object and executable file extensions when run on Win32.
ctags-4.0.3 (Sun Jul 16 2000)
* Fixed compiler warnings [Amiga].
* Fixed problem in configure.in causing struct stat st_ino member test to fail.
* Fixed problem with TAGS entries for files using DOS-style (CR-LF) new lines.
* Improved algorithm for locating Perl functions and skipping pods.
* Improved algorithm for locating shell functions [Sh].
* Renamed Makefile.amiga to Makefile.manx [Amiga].
* Added Makefile.sas for SAS C compiler [Amiga].
* Updated Makefile.qdos [QDOS].
* Improved support for DECC compiler [VAX].
ctags-4.0.2 (Mon Jul 10 2000)
* Now silently ignore -w option for backwards compatibility with SVR4 ctags.
* Fixed bug resulting in no extension flags when using --kind-long option.
ctags-4.0.1 (Wed Jun 28 2000)
* Fixed segmentation violation when using --file-tags.
ctags-4.0 (Thu Jun 22 2000)
* Fixed infinite loop on certain syntactically invalid class constructs [C++].
* Fixed problem of incorrect tags for some pure virtual functions [C++].
* Fixed inability to clear all tag types when using --c-types= (all languages).
* Fixed problem of arguments to parameterized class being reported as
ancestors in the "inherits" extension flag.
* Fixed missed tags for typedef-ed function pointers having a PROTO((a,b))
style argument list.
* Fixed missing file tags for referenced files when using --line-directives
option [C/C++].
* Fixed failure to recognize drive-qualified file name as a file name when
supplied as argument to -I option [Win32].
* Fixed problem with missing comma in "inherits" extension flag [Java].
* Fixed problem with incorrect or redundant parents listed for "inherits"
extension flag [Java].
* Added check to avoid recursive symbolic links to directories.
* Added warning message for -i option, which is deprecated and being dropped.
* Added support for Assembler, COBOL, LISP, PERL, and Scheme, taken from Gnu
etags.
* Added support for AWK, Bourne/Korn/Z Shell, Python, TCL, and Vim scripts.
* Added support for the BETA language, submitted by Erik Corry.
* Added ability to determine language from interpreter specified in first line
of executable files if they are not recognized by their extension.
* Added --options option.
* Added ability to specify files having no extension with -h and --langmap
options.
* Added compile time option to separate path components with a unix-style path
separator for sharing tag file across platforms, enabled by defining the
label UNIX_PATH_SEPARATOR [Win32].
* Fixed portability issues [VMS].
ctags-3.5.2 (Mon Apr 24 2000)
* Fixed problem preventing Emacs-style tags from being written to stdout.
ctags-3.5.1 (Sun Apr 23 2000)
* Fixed infinite loop in writing Emacs-style TAGS file on platforms using
tmpnam() instead of mkstemp() [Win32].
* Fixed minor problems in Borland makefiles [Win32].
* Fixed compiler warning [DJGPP].
ctags-3.5 (Fri Apr 14 2000)
* Fixed core dump when including access field in tag file [Java].
* Fixed failure to identify end of statement for block statements [Java].
* Fixed bug with lone "end" in feature adaptation part of inheritance clause
[Eiffel].
* Fixed problem preventing const functions from being recognized as pure
virtual [C/C++].
* Fixed problem with no tags found after certain macro calls [C/C++].
* Fixed bug in descrip.mms build file [VMS].
* Changed to use mkstemp() (when available) to create temporary files for
security reasons and allow configuring default temporary directory, and to
override this directory at run-time by setting TMPDIR environment variable.
* Added support for extracting inheritance information into new "inherits"
extension flag [C++, Java].
* Added Makefile.bc5 for Borland C++ version 5.5 compiler (free version).
* Added new question to FAQ regarding Xemacs.
* Updated FAQ regarding new release of NEdit.
* Renamed Borland 3.1 makefile from Makefile.bcc to Makefile.bc3.
* Renamed Microsoft Visual C++ makefile from Makefile.w32 to Makefile.mvc.
ctags-3.4 (Thu Jan 13 2000)
* Fixed sorting problems when LC_ALL environment variable was set to foreign
locale (not fixed by previous release).
* Fixed nested scoping reported in extension flags and class-qualified tags.
* Eliminated generation of class-qualified tag entries when --c-types=+C
option is in effect but scope is empty (e.g. "::main").
* Added support for default access of class members in Java.
* Added new extension flag "implementation", which indicates if a routine or
class is virtual or abstract.
* Minor changes for OS/2 compilation.
ctags-3.3.3 (Thu Dec 16 1999)
* Changed how input is read for -L and --filter options to permit file names
containing spaces (see man page).
* Fixed scope recorded for C++ class elements, especially in namespaces.
* Fixed spurious tag generated for MODULE PROCEDURE in interfaces [Fortran].
* Fixed sorting problems when LC_ALL environment variable was set to foreign
locale.
* Fixed crash on Windows when compiled with Mingw32 gcc compiler.
* Fixed compilation problems on Cray.
ctags-3.3.2 (Fri Sep 24 1999)
* Fixed compile problem on AIX 4.1.
* Improved recovery from syntax error [Fortran].
* Changed name of configure option (now --enable-custom-config).
* Changed Makefile.bcc to optimize for space, since code size exceeded 64KB.
ctags-3.3.1 (Mon Sep 20 1999)
* Fixed segmentation violation occurring when directory recursion was selected.
* Fixed misleading message when out of memory during internal sort.
ctags-3.3 (Fri Sep 17 1999)
* Fixed missing class-qualified tags [Java].
* Fixed missing tag for functions having function pointer argument [C].
* Fixed parsing of conversion functions [C++].
* Added missing space following "operator" keyword to the tag names generated
for function call operators [C++].
* Fixed string parsing to retry file as free source form upon EOF [Fortran].
* Fixed missing tags following comments [Fortran].
* Fixed missing labels for free source form [Fortran].
* Removed 72 character limit for fixed form source lines, since many compilers
relax this limit and it is commonly taken advantage of. This was sometimes
causing fixed form source to be parsed as free form source [Fortran].
* Changed misleading message when file could not be accessed.
* Changed behavior of --verbose option to display option processing.
* Changed -I option to permit clearing the token list with "-I-".
* Changed --lang option to accept new "auto" parameter.
* Changed --langmap option to accept new "default" parameter.
* Changed --eiffel-types option to accept new 'C' flag to generate
class-qualified tags.
* Changed -h option to accept new "default" parameter.
* Changed option processing. Most options may now appear anywhere on the
command line, affecting only those files which follow them.
* Added ability to specify default options in any of the files /etc/ctags.conf,
/usr/local/etc/ctags.conf, $HOME/.ctags, .ctags, and one optional file,
which can be supplied at configure time.
* Added --filter option.
* Added --filter-terminator option.
ctags-3.2.4 (Thu Jul 01 1999)
* Changed name of macro in Makefile.in to avoid being overriden by CTAGS
environment variable.
ctags-3.2.3 (Mon Jun 21 1999)
* Small portability change for EMX compiler on OS/2.
* Slight change to W32 and BCC makefiles.
ctags-3.2.2 (Sat May 29 1999)
* Fixed endless error loop in the case of unreadable file.
* Fixed redundant include entries in TAGS file when using --etags-include.
ctags-3.2.1 (Wed May 09 1999)
* Fixed problem reading -I token list from file.
* Fixed with "using" declarations which corrupted tag file [C++].
* Fixed configure.in to more reliably recognize existing prototypes.
* Added ability to ignore preprocessor directives in Fortran files.
* Added support for egcs/MingW32 compiler [Win32].
ctags-3.2 (Wed Mar 03 1999)
* Fixed spurious tags related to export specifiers of feature clauses [Eiffel].
* Fixed problem with template in ctor-initialer [C++].
* Fixed typo causing compiler error [MSVC].
* Extended -I option to allow token replacement [thanks to Flemming Madsen].
* Added --etags-include option to support TAGS file includes.
* Added support for QDOS [thanks to Thierry Godefroy].
ctags-3.1.2 (Tue Jan 26 1999)
* Changed extension flags to eliminate space between label and value to remain
true to the intent of the agreement on the extended format made with editor
authors.
* Added --links option to permit ignoring symbolic links.
* Fixed missing tags upon ANSI style variable function argument lists.
* Fixed missing tags for methods with fully qualified type names in argument
list [Java].
* Fixed double tags generated for enumerators followed by comma.
* Fixed missing path prefix for -p option [Win 95/NT].
ctags-3.1 (Wed Jan 20 1999)
* Changed -h and -langmap options to accept a plus sign as the first character
of their arguments to indicate that arguments should be added to current.
* Changed default for member tags to 'on' [C/C++].
* Changed default for local entities to 'off' [Eiffel].
* Added tags for forward class/struct/union/enum declarations when using
-c-types=+x [C/C++].
* Fixed memory overwrite bug causing general protection fault [Win 95/NT].
* Fixed missing tags for methods with throws clause [Java].
* Fixed bad tags generated for null macro names [C].
* Fixed spurious tag for features and entities of BIT type [Eiffel].
* Fixed spurious tags when local entity declaration list was empty [Eiffel].
* Fixed missing tags for contructors and destructors [C++].
* Fixed failure to recognize function when declaration for first argument
was of template type [C++].
ctags-3.0.3 (Mon Dec 21 1998)
* Fixed mistake made in previous version which caused macro tags to be missed.
* Fixed parsing of --langmap option.
ctags-3.0.2 (Mon Dec 21 1998)
* Added tags for names undefined with #undef [C/C++].
* Added tags for renamed features (Eiffel).
* Improved Emacs-style tag file contents (per Ian Zimmerman).
* Fixed problem handling deferred, external, once, obsolete features in Eiffel.
* Fixed porting problem [OSF1 V4.0].
ctags-3.0.1 (Sat Dec 12 1998)
* Fixed problem with certain macros and functions with no declared return type.
* Fixed problem causing endless loop on MSDOS/Win32 by restoring use of binary
mode on opening of source files.
* Fixed porting problems [SunOS 4.1.x and MSVC++ 5.0].
ctags-3.0 (Sun Dec 06 1998)
* Added support for the Eiffel language (everyone should learn Eiffel).
* Added support for the Fortran language.
* Added --c-types option to specify tag types to be included for C/C++.
* Added --eiffel-types option to specify tag types to be included for Eiffel.
* Added --fortran-types option to specify tag types to be included for Fortran.
* Added --file-scope option to place verbose tag description into tag file.
* Added --file-tags option to place tags for source file names into tag file.
* Added --java-types option to specify tag types to be included for Java.
* Added --kind-long option to place verbose tag description into tag file.
* Added --linedirectives option to enable processing of #line directives so
that running ctags on preprocessor output can generate line numbers and file
names which correspond to the original source files.
* Added -V option to enable verbose message for each file considered.
* Added special handling for macros of form "INIT(= value)".
* Added ability to suffix an ignored identifier (-I option) with the '+'
character, thus instructing ctags to also ignore any argument list which
may follow the identifier.
* Changed the -i option, moving Java language options to the new --java-types
option. The -i option is now deprecated in favor of the new language
specific tag type options.
* Changed behavior of handling of ignored identifiers (-I option) to still
generate a tag for any macro definition for that identifier.
* Changed handling of -h option so that include files are no longer assumed to
be C++ files.
* Changed tags for operators to always precede the operator with the string
"operator ", thus making it consistent for all operators. [C++]
* Changed C/C++ parsing, catching many more tricky constructs.
* Changed extension flags to place a space between the label and the value for
readability.
* Fixed core dump which occurred when using -iF (now --file-tags) together
with -e (etags) on a zero-length file.
* Fixed missing or incorrect tags for conversions operators or operator "()".
* Fixed incorrect parent class in extension flags for type declarations of the
form "class Bar { OtherClass::sometype foo; }".
* Fixed missing tags for "friend" and "static" prototypes in header files.
* Fixed problem of external "sort" reporting locale not available on HPUX.
* Fixed -p option.
* Fixed VMS support. It should now work for any source file type.
ctags-2.3.2 (Wed Sep 09 1998)
* Fixed -h option; broken since version 1.7, yet only just reported.
ctags-2.3.1 (Sun Aug 30 1998)
* Fixed improper handling of derived structs.
* Fixed wrong class name tag when a nested-name-specifier was present in class
declaration.
* Added parent information into tag extension flags for data structures to
match that already present for members.
* Add missing documentation for --langmap option in the --help output.
* Eliminated compiler warning [gcc 2.8.1].
ctags-2.3 (Thu Aug 20 1998)
* Eliminated compiler warnings [SGI MIPSpro].
ctags-2.2.7 (Mon Aug 17 1998)
* Fixed porting problem [Borland C++].
ctags-2.2.6 (Wed Aug 12 1998)
* Fixed core dump encountered on some platforms when the CTAGS environment
variable was set but empty.
* Fixed porting problem [MSVC].
* Added directory recursion support for Amiga.
ctags-2.2.3 (Sun Aug 02 1998)
ctags-2.2.2 (Fri Jul 24 1998)
* Fixed porting problems [AIX, HP-UX, OSF/1, SunOS, MSVC].
ctags-2.2.1 (Fri Jul 24 1998)
* Now uses a default directory name of "." when using -R or --recurse option
(e.g. "ctags -R" is equivalent to "ctags -R .").
* Directories named "SCCS" are skipped when using the -R or --recurse option
under Unix.
* Fixed porting problems [HP-UX, IRIX, SunOS, MSDOS/Windows].
ctags-2.2 (Mon Jul 20 1998)
* Added the --recurse and -R options to allow recursing into directories.
This allows running ctags on an entire source directory tree using the
single command "ctags -R <dir>". Currently, this option is only supported on
UNIX, MSDOS, Windows 95/NT, and OS/2. Other platforms will have to wait.
* Changed writing of Emacs-style TAGS file to binary mode [MSDOS/Windows].
* Fixed porting problems [HP-UX, OSF/1].
ctags-2.1.1 (Mon Jul 06 1998)
* Changed -h option to allow only periods to separate extensions.
* Added the --langmap option to allow overriding the default associations
between source language and file extension.
* Added configuration check and code work-around for putenv() prototypes
missing the const from the argument declaration [IRIX 5.2 and CRAY J90].
* Added makefile for VMS.
* Fixed porting problem [HP-UX].
ctags-2.1 (Wed Jul 01 1998)
* Added Java support.
* Eliminated the --keywords option introduced in the 2.0.4, replacing it with
automatic detection of the language (i.e. recognized keywords) based upon
the file extension.
* Added the --lang option for manually overriding the automatic selection of
the language.
* Added new flag 'i' to the -i option to allow generating tags for Java
interfaces.
* Added new flag 'n' to the -i option to allow generating tags for C++
namespaces.
* Added new flag 'x' to the -i option to allow generating tags for extern
variable declarations.
* Added new extension flags, "private", "protected", and "public", which
indicate the visibility of class members when it can be determined.
* Changed behavior of flag 'C' of the -i option to add tags of form
"class.member" for Java.
* Changed how files on command line are handled. Ctags will now only scan
those files whose extensions it knows about unless the --lang option is
specified. This allows running ctags on all files in a directory without
having to be specific (e.g. "ctags *").
* Removed support for duplicate tag warnings and the -w and -W options. These
options are silently ignored for now.
ctags-2.0.4 (Sat May 23 1998)
* Added sorting time to the output of the --totals option.
* Added the --keywords option to allow restricting the recognized
declaration keywords in order to handle legacy source code which uses
newer keywords for variable and parameter names.
* Ignore list now also applies to macro tags.
* /dev/stdout now properly handled as parameter to -f/-o option.
* Fixed problem handling an operator definition in C++ when white space
appeared between the "operator" keyword and the operator (e.g. "=").
* Fixed handling of non-symbolic operators (e.g. "new", "delete", etc.).
* Fixed sort order problem for some locale settings.
* Fixed segmentation violation when using ignore list (-I) on SunOS 4.x.
* Fixed a segmentation violation caused by a stack overwrite when testing a
particular kind of non-standard tag file format.
ctags-2.0.3 (Sun Mar 12 1998)
* Added configure check for "strip" program.
* Added new flag 'C' to the -i option to allow adding extra tags to the tag
file in the form "class::member" for class methods and members.
ctags-2.0.2 (Wed Feb 25 1998)
* Added stripping of installed binary for "install" target.
ctags-2.0.1 (Thu Feb 19 1998)
* Added support for C++.
* Added new flag 'F' to the -i option to allow adding an extra tag for the
basename of each source file supplied to ctags. This provides the ability to
jump to a source file in Vi using ":tag file.c".
* Added new flag 'm' to generate tags for class, structure, and union members
(disabled by default).
* Added several new flags to the -i option to allow finer specification of
which types of tags to include/exclude.
* Added ".hh" extension to the default list of files recognized as header
files.
* Added explicit handling of special gcc construct __attribute((..)),
which could lead to incorrect tag generation.
* Added configure option --disable-extended-format to allow building ctags
with the extended format disabled by default.
* Added configure option --enable-macro-patterns to change the default
behavior of ctags to generate patterns instead of line numbers for macro
(define) tags.
* Changed configure option --enable-internal-sort to --disable-external-sort.
* Changed makefile for OS/2.
* Removed support for the -d, -t and -T options which had been deprecated
for some time.
* Removed ANNOUNCE file in distribution, consolidating it with the README
file.
* Replaced CHANGES file with NEWS for more GNU-like standard distribution.
* Improved the detection of macros of the type generated by Microsoft Visual C
when generating source code. These caused subsequent statements to fail to
have tags generated for them. Still not bullet proof, though.
* Fixed a problem which prevented the use of / as a path separator under MSDOS
and Win 95/NT.
* Fixed problem of blank lines occuring in the tag file.
* Fixed recognition of declarations with parentheses.
* Fixed problem of missing tags for objects within extern "C" blocks.
* Fixed problem in source file counts when using --totals option.
* Extended the length of tag type field in -x output to be more verbose.
* Fixed option initialization error which caused static tags to be excluded.
ctags-1.7 (Mon Oct 13 1997)
* Tag files now use a new extended format which is backwards compatible with
existing Vi implementations, yet provides extended information which can be
used by supporting editors.
* Added documentation pseudo-tags (e.g. !_TAG_FILE_FORMAT) to tag file.
* Added the --excmd option as alternative to the -n and -N options.
* Added the --format option to allow forcing the old-style tag file format.
* Added the --if0 to control how "#if 0" branches are handled.
* Added the --sort option as alternative to -u option.
* Added the --totals option to print statistics of tag generation.
* Added the --version option.
* Improved handling of preprocessor conditionals.
* Code within an #if 0 is now never scanned for non-macro tags by default
since tags within that code could conceivably be overridden by more
desirable tags in the #else branch to follow. Macro tags in these branches
are always included.
* Fixed problem which could leave invalid tag entries in tag file when an
internal re-scan of a source file occurred.
* Fixed problem with internal sort mechanism when appending tags to existing
file.
* Changed external sort command to filter out duplicate identical tags lines
(including the pattern) unless warnings for duplicate tags are enabled.
* Added data to emacs style tag entries to more closely match that produced by
the GNU etags.
* Removed fixed limits on maximum tag line length.
* Correction to Amiga makefile.
* Improvements to Win32 portability with changes to Makefile.w32.
ctags-1.6 (Tue May 13 1997)
* Now using GNU autoconf to permit automatic host configuration.
* Added the -e option to generate Emacs style tag files
* Added ETAGS environment variable to be used when -e option is in effect.
* Added the -p option to supply a default path for source files.
* Fixed problem of incorrect line numbers in tag file when form feeds and
vertical tabs occured in the source file.
* Fixed problem preventing ignoring of identifiers specified via the -I option
when the identifiers were followed by a parameter list in the source code.
* Changed the search patterns generated for #define macros when using -N
option. It now includes the character following the name (or "$" if end of
line) instead of the "\>" used previously. Some editors did not support this
metacharacter for tag searches.
* Removed -u (unique) flag from sort command line invocation to retain exactly
indentical tag patterns in the same file. This is in preparation for editor
support of duplicate tags.
* Fixed problem resulting in no tags generated following a function-like
macro reference outside of a function block.
* Fixed problem of no tags generated for typedef for function or function
pointer.
* Fixed problem of no tags generated after encountering strange function
declarations (e.g. "foo(params) saywhat (void);")
ctags-1.5 (Sat Oct 5 1996)
* Added generation of tags for objects inside C++ extern blocks (e.g.
'extern "C" {...}' construct).
* Added generation of tags for function definitions inside brace-enclosed
("{}") blocks, since function definitions are allowed inside classes and
extern blocks.
* Added the -N option to force patterns to be used for all tags (including
macro tags).
* Changed the search patterns generated for macro definitions to be terminated
with "\>", which allows the pattern to still match even when the #define
line beyond the macro name is changed.
* Fixed problem resulting in no tags generated for files containing a
function-like macro, such as 'MODULE_ID("$Id")', even when ignoring the
keyword. This also fixed a problem that caused tags to be missed for
initialized function pointer definitions.
* Redirected error messages to stdout for MSDOS version.
ctags-1.4 (Sun Aug 18 1996)
* Added recursive parsing of class/struct/enum blocks to look for
class/struct/enum tags and enumeration values.
* Added the -I option to specify keywords to ignore in the source files.
* Fixed problem resulting in no tag generated when declaring a pointer const
or volatile.
* Fixed problem resulting in no tag generated for comma terminated function
declarations.
ctags-1.3 (Sun Jun 16 1996)
* Fixed problem problem which caused "struct tag;" to be misinterpreted as a
variable definition.
* Added the -n option to use line numbers in the tag file instead of patterns.
* Added the -? option as an alternative for the --help option.
ctags-1.2 (Wed Jun 5 1996)
* Fixed a problem caused by an unitialized variable.
ctags-1.1 (Tue Jun 4 1996)
* Fixed problem reading parameter list to the -h option.
ctags-1.0a (Mon Jun 3 1996)
* Added ctags.lsm to distribution
ctags-1.0 (Fri May 31 1996)
* First public release.
vim:tw=78
diff --git a/routines.c b/routines.c
index dcd83f21..ed528ddc 100644
--- a/routines.c
+++ b/routines.c
@@ -1,757 +1,752 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* This module contains a lose assortment of shared functions.
*/
/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#ifdef HAVE_STDLIB_H
# include <stdlib.h> /* to declare malloc (), realloc () */
#endif
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
#include <errno.h>
#include <stdio.h> /* to declare tempnam(), and SEEK_SET (hopefully) */
#ifdef HAVE_FCNTL_H
# include <fcntl.h> /* to declar O_RDWR, O_CREAT, O_EXCL */
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* to declare mkstemp () */
#endif
/* To declare "struct stat" and stat ().
*/
#if defined (HAVE_SYS_TYPES_H)
# include <sys/types.h>
#else
# if defined (HAVE_TYPES_H)
# include <types.h>
# endif
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#else
# ifdef HAVE_STAT_H
# include <stat.h>
# endif
#endif
#ifdef HAVE_DOS_H
# include <dos.h> /* to declare MAXPATH */
#endif
#ifdef HAVE_DIRECT_H
# include <direct.h> /* to _getcwd */
#endif
#ifdef HAVE_DIR_H
# include <dir.h> /* to declare findfirst () and findnext () */
#endif
#include "debug.h"
#include "routines.h"
#ifdef TRAP_MEMORY_CALLS
# include "safe_malloc.h"
#endif
/*
* MACROS
*/
#ifndef TMPDIR
# define TMPDIR "/tmp"
#endif
/* File type tests.
*/
#ifndef S_ISREG
# if defined (S_IFREG) && ! defined (AMIGA)
# define S_ISREG(mode) ((mode) & S_IFREG)
# else
# define S_ISREG(mode) TRUE /* assume regular file */
# endif
#endif
#ifndef S_ISLNK
# ifdef S_IFLNK
# define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
# else
# define S_ISLNK(mode) FALSE /* assume no soft links */
# endif
#endif
#ifndef S_ISDIR
# ifdef S_IFDIR
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
# else
# define S_ISDIR(mode) FALSE /* assume no soft links */
# endif
#endif
#ifndef S_IFMT
# define S_IFMT 0
#endif
#ifndef S_IXUSR
# define S_IXUSR 0
#endif
#ifndef S_IXGRP
# define S_IXGRP 0
#endif
#ifndef S_IXOTH
# define S_IXOTH 0
#endif
#ifndef S_IRUSR
# define S_IRUSR 0400
#endif
#ifndef S_IWUSR
# define S_IWUSR 0200
#endif
#ifndef S_ISUID
# define S_ISUID 0
#endif
/* Hack for rediculous practice of Microsoft Visual C++.
*/
#if defined (WIN32)
# if defined (_MSC_VER)
# define stat _stat
# define getcwd _getcwd
# define PATH_MAX _MAX_PATH
# elif defined (__BORLANDC__)
# define PATH_MAX MAXPATH
# endif
#endif
#ifndef PATH_MAX
# define PATH_MAX 256
#endif
/*
* Miscellaneous macros
*/
#define selected(var,feature) (((int)(var) & (int)(feature)) == (int)feature)
/*
* DATA DEFINITIONS
*/
#if defined (MSDOS_STYLE_PATH)
const char *const PathDelimiters = ":/\\";
#elif defined (VMS)
const char *const PathDelimiters = ":]>";
#endif
char *CurrentDirectory;
static const char *ExecutableProgram;
static const char *ExecutableName;
/*
* FUNCTION PROTOTYPES
*/
#ifdef NEED_PROTO_STAT
extern int stat (const char *, struct stat *);
#endif
#ifdef NEED_PROTO_LSTAT
extern int lstat (const char *, struct stat *);
#endif
#if defined (MSDOS) || defined (WIN32) || defined (VMS) || defined (__EMX__) || defined (AMIGA)
# define lstat(fn,buf) stat(fn,buf)
#endif
/*
* FUNCTION DEFINITIONS
*/
extern void setExecutableName (const char *const path)
{
ExecutableProgram = path;
ExecutableName = baseFilename (path);
#ifdef VAXC
{
/* remove filetype from executable name */
char *p = strrchr (ExecutableName, '.');
if (p != NULL)
*p = '\0';
}
#endif
}
extern const char *getExecutableName (void)
{
return ExecutableName;
}
extern void error (const errorSelection selection,
const char *const format, ...)
{
va_list ap;
va_start (ap, format);
fprintf (errout, "%s: %s", getExecutableName (),
selected (selection, WARNING) ? "Warning: " : "");
vfprintf (errout, format, ap);
if (selected (selection, PERROR))
#ifdef HAVE_STRERROR
fprintf (errout, " : %s", strerror (errno));
#else
perror (" ");
#endif
fputs ("\n", errout);
va_end (ap);
if (selected (selection, FATAL))
exit (1);
}
/*
* Memory allocation functions
*/
extern void *eMalloc (const size_t size)
{
void *buffer = malloc (size);
if (buffer == NULL)
error (FATAL, "out of memory");
return buffer;
}
extern void *eCalloc (const size_t count, const size_t size)
{
void *buffer = calloc (count, size);
if (buffer == NULL)
error (FATAL, "out of memory");
return buffer;
}
extern void *eRealloc (void *const ptr, const size_t size)
{
void *buffer;
if (ptr == NULL)
buffer = eMalloc (size);
else
{
buffer = realloc (ptr, size);
if (buffer == NULL)
error (FATAL, "out of memory");
}
return buffer;
}
extern void eFree (void *const ptr)
{
Assert (ptr != NULL);
free (ptr);
}
/*
* String manipulation functions
*/
/*
* Compare two strings, ignoring case.
* Return 0 for match, < 0 for smaller, > 0 for bigger
* Make sure case is folded to uppercase in comparison (like for 'sort -f')
* This makes a difference when one of the chars lies between upper and lower
* ie. one of the chars [ \ ] ^ _ ` for ascii. (The '_' in particular !)
*/
extern int struppercmp (const char *s1, const char *s2)
{
int result;
do
{
result = toupper ((int) *s1) - toupper ((int) *s2);
} while (result == 0 && *s1++ != '\0' && *s2++ != '\0');
return result;
}
extern int strnuppercmp (const char *s1, const char *s2, size_t n)
{
int result;
do
{
result = toupper ((int) *s1) - toupper ((int) *s2);
} while (result == 0 && --n > 0 && *s1++ != '\0' && *s2++ != '\0');
return result;
}
#ifndef HAVE_STRSTR
extern char* strstr (const char *str, const char *substr)
{
const size_t length = strlen (substr);
const char *match = NULL;
const char *p;
for (p = str ; *p != '\0' && match == NULL ; ++p)
if (strncmp (p, substr, length) == 0)
match = p;
return (char*) match;
}
#endif
extern char* eStrdup (const char* str)
{
char* result = xMalloc (strlen (str) + 1, char);
strcpy (result, str);
return result;
}
extern void toLowerString (char* str)
{
while (*str != '\0')
{
*str = tolower ((int) *str);
++str;
}
}
extern void toUpperString (char* str)
{
while (*str != '\0')
{
*str = toupper ((int) *str);
++str;
}
}
/* Newly allocated string containing lower case conversion of a string.
*/
extern char* newLowerString (const char* str)
{
char* const result = xMalloc (strlen (str) + 1, char);
int i = 0;
do
result [i] = tolower ((int) str [i]);
while (str [i++] != '\0');
return result;
}
/* Newly allocated string containing upper case conversion of a string.
*/
extern char* newUpperString (const char* str)
{
char* const result = xMalloc (strlen (str) + 1, char);
int i = 0;
do
result [i] = toupper ((int) str [i]);
while (str [i++] != '\0');
return result;
}
/*
* File system functions
*/
extern void setCurrentDirectory (void)
{
#ifndef AMIGA
char* buf;
#endif
if (CurrentDirectory == NULL)
CurrentDirectory = xMalloc ((size_t) (PATH_MAX + 1), char);
#ifdef AMIGA
strcpy (CurrentDirectory, ".");
#else
buf = getcwd (CurrentDirectory, PATH_MAX);
if (buf == NULL)
perror ("");
#endif
if (CurrentDirectory [strlen (CurrentDirectory) - (size_t) 1] !=
PATH_SEPARATOR)
{
- printf (CurrentDirectory + strlen (CurrentDirectory), "%c",
+ sprintf (CurrentDirectory + strlen (CurrentDirectory), "%c",
OUTPUT_PATH_SEPARATOR);
}
}
#ifdef AMIGA
static boolean isAmigaDirectory (const char *const name)
{
boolean result = FALSE;
struct FileInfoBlock *const fib = xMalloc (1, struct FileInfoBlock);
if (fib != NULL)
{
const BPTR flock = Lock ((UBYTE *) name, (long) ACCESS_READ);
if (flock != (BPTR) NULL)
{
if (Examine (flock, fib))
result = ((fib->fib_DirEntryType >= 0) ? TRUE : FALSE);
UnLock (flock);
}
eFree (fib);
}
return result;
}
#endif
/* For caching of stat() calls */
extern fileStatus *eStat (const char *const fileName)
{
struct stat status;
static fileStatus file;
if (file.name == NULL || strcmp (fileName, file.name) != 0)
{
if (file.name != NULL)
eFree (file.name);
file.name = eStrdup (fileName);
if (lstat (file.name, &status) != 0)
file.exists = FALSE;
else
{
file.isSymbolicLink = (boolean) S_ISLNK (status.st_mode);
if (file.isSymbolicLink && stat (file.name, &status) != 0)
file.exists = FALSE;
else
{
file.exists = TRUE;
#ifdef AMIGA
file.isDirectory = isAmigaDirectory (file.name);
#else
file.isDirectory = (boolean) S_ISDIR (status.st_mode);
#endif
file.isNormalFile = (boolean) (S_ISREG (status.st_mode));
file.isExecutable = (boolean) ((status.st_mode &
(S_IXUSR | S_IXGRP | S_IXOTH)) != 0);
file.isSetuid = (boolean) ((status.st_mode & S_ISUID) != 0);
file.size = status.st_size;
}
}
}
return &file;
}
extern boolean doesFileExist (const char *const fileName)
{
fileStatus *status = eStat (fileName);
return status->exists;
}
extern boolean isRecursiveLink (const char* const dirName)
{
boolean result = FALSE;
fileStatus *status = eStat (dirName);
if (status->isSymbolicLink)
{
char* const path = absoluteFilename (dirName);
while (path [strlen (path) - 1] == PATH_SEPARATOR)
path [strlen (path) - 1] = '\0';
while (! result && strlen (path) > (size_t) 1)
{
char *const separator = strrchr (path, PATH_SEPARATOR);
if (separator == NULL)
break;
else if (separator == path) /* backed up to root directory */
*(separator + 1) = '\0';
else
*separator = '\0';
result = isSameFile (path, dirName);
}
eFree (path);
}
return result;
}
extern boolean isSameFile (const char *const name1, const char *const name2)
{
boolean result = FALSE;
#if defined (HAVE_STAT_ST_INO)
struct stat stat1, stat2;
if (stat (name1, &stat1) == 0 && stat (name2, &stat2) == 0)
result = (boolean) (stat1.st_ino == stat2.st_ino);
#elif defined (CASE_INSENSITIVE_FILENAMES)
result = (boolean) (strcasecmp (name1, name2) == 0);
#else
result = (boolean) (strcmp (name1, name2) == 0);
#endif
return result;
}
#ifndef HAVE_FGETPOS
extern int fgetpos (FILE *stream, fpos_t *pos)
{
int result = 0;
*pos = ftell (stream);
if (*pos == -1L)
result = -1;
return result;
}
extern int fsetpos (FILE *stream, fpos_t const *pos)
{
return fseek (stream, *pos, SEEK_SET);
}
#endif
/*
* Pathname manipulation (O/S dependent!!!)
*/
extern const char *baseFilename (const char *const filePath)
{
#if defined (MSDOS_STYLE_PATH) || defined (VMS)
const char *tail = NULL;
unsigned int i;
/* Find whichever of the path delimiters is last.
*/
for (i = 0 ; i < strlen (PathDelimiters) ; ++i)
{
const char *sep = strrchr (filePath, PathDelimiters [i]);
if (sep > tail)
tail = sep;
}
#else
const char *tail = strrchr (filePath, PATH_SEPARATOR);
#endif
if (tail == NULL)
tail = filePath;
else
++tail; /* step past last delimiter */
#ifdef VAXC
{
/* remove version number from filename */
char *p = strrchr ((char *) tail, ';');
if (p != NULL)
*p = '\0';
}
#endif
return tail;
}
extern boolean isAbsolutePath (const char *const path)
{
boolean result = FALSE;
#if defined (MSDOS_STYLE_PATH)
if (strchr (PathDelimiters, path [0]) != NULL)
result = TRUE;
else if (isalpha (path [0]) && path [1] == ':')
{
if (strchr (PathDelimiters, path [2]) != NULL)
result = TRUE;
else
/* We don't support non-absolute file names with a drive
* letter, like `d:NAME' (it's too much hassle).
*/
error (FATAL,
"%s: relative file names with drive letters not supported",
path);
}
#elif defined (VMS)
result = (boolean) (strchr (path, ':') != NULL);
#else
result = (boolean) (path [0] == PATH_SEPARATOR);
#endif
return result;
}
/* Return a newly-allocated string whose contents concatenate those of
* s1, s2, s3.
* Routine adapted from Gnu etags.
*/
static char* concat (const char *s1, const char *s2, const char *s3)
{
int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
char *result = xMalloc (len1 + len2 + len3 + 1, char);
strcpy (result, s1);
strcpy (result + len1, s2);
strcpy (result + len1 + len2, s3);
result [len1 + len2 + len3] = '\0';
return result;
}
/* Return a newly allocated string containing the absolute file name of FILE
* given CWD (which should end with a slash).
* Routine adapted from Gnu etags.
*/
extern char* absoluteFilename (const char *file)
{
char *slashp, *cp;
char *res = NULL;
if (isAbsolutePath (file))
res = eStrdup (file);
else
res = concat (CurrentDirectory, file, "");
/* Delete the "/dirname/.." and "/." substrings. */
- slashp = strchr (res, '/');
+ slashp = strchr (res, PATH_SEPARATOR);
while (slashp != NULL && slashp [0] != '\0')
{
if (slashp[1] == '.')
{
- if (slashp [2] == '.' && (slashp [3] == '/' || slashp [3] == '\0'))
+ if (slashp [2] == '.' &&
+ (slashp [3] == PATH_SEPARATOR || slashp [3] == '\0'))
{
cp = slashp;
do
cp--;
while (cp >= res && ! isAbsolutePath (cp));
if (cp < res)
cp = slashp;/* the absolute name begins with "/.." */
#ifdef MSDOS_STYLE_PATH
/* Under MSDOS and NT we get `d:/NAME' as absolute file name,
* so the luser could say `d:/../NAME'. We silently treat this
* as `d:/NAME'.
*/
- else if (cp [0] != '/')
+ else if (cp [0] != PATH_SEPARATOR)
cp = slashp;
#endif
strcpy (cp, slashp + 3);
slashp = cp;
continue;
}
- else if (slashp [2] == '/' || slashp [2] == '\0')
+ else if (slashp [2] == PATH_SEPARATOR || slashp [2] == '\0')
{
strcpy (slashp, slashp + 2);
continue;
}
}
- slashp = strchr (slashp + 1, '/');
+ slashp = strchr (slashp + 1, PATH_SEPARATOR);
}
if (res [0] == '\0')
return eStrdup ("/");
else
{
#ifdef MSDOS_STYLE_PATH
- /* Canonicalize drive letter case. */
+ /* Canonicalize drive letter case. */
if (res [1] == ':' && islower (res [0]))
res [0] = toupper (res [0]);
#endif
return res;
}
}
/* Return a newly allocated string containing the absolute file name of dir
* where FILE resides given CWD (which should end with a slash).
* Routine adapted from Gnu etags.
*/
extern char* absoluteDirname (char *file)
{
char *slashp, *res;
char save;
-#ifdef MSDOS_STYLE_PATH
- char *p;
- for (p = file ; *p != '\0' ; p++)
- if (*p == '\\')
- *p = '/';
-#endif
- slashp = strrchr (file, '/');
+ slashp = strrchr (file, PATH_SEPARATOR);
if (slashp == NULL)
res = eStrdup (CurrentDirectory);
else
{
save = slashp [1];
slashp [1] = '\0';
res = absoluteFilename (file);
slashp [1] = save;
}
return res;
}
/* Return a newly allocated string containing the file name of FILE relative
* to the absolute directory DIR (which should end with a slash).
* Routine adapted from Gnu etags.
*/
extern char* relativeFilename (const char *file, const char *dir)
{
const char *fp, *dp;
char *absdir, *res;
int i;
/* Find the common root of file and dir (with a trailing slash). */
absdir = absoluteFilename (file);
fp = absdir;
dp = dir;
while (*fp++ == *dp++)
continue;
fp--;
dp--; /* back to the first differing char */
do
- { /* look at the equal chars until '/' */
+ { /* look at the equal chars until path sep */
if (fp == absdir)
return absdir; /* first char differs, give up */
fp--;
dp--;
- } while (*fp != '/');
+ } while (*fp != PATH_SEPARATOR);
/* Build a sequence of "../" strings for the resulting relative file name.
*/
i = 0;
- while ((dp = strchr (dp + 1, '/')) != NULL)
+ while ((dp = strchr (dp + 1, PATH_SEPARATOR)) != NULL)
i += 1;
res = xMalloc (3 * i + strlen (fp + 1) + 1, char);
res [0] = '\0';
while (i-- > 0)
strcat (res, "../");
/* Add the file name relative to the common root of file and dir. */
strcat (res, fp + 1);
free (absdir);
return res;
}
extern FILE *tempFile (const char *const mode, char **const pName)
{
char *name;
FILE *fp;
int fd;
#if defined(HAVE_MKSTEMP)
const char *const pattern = "tags.XXXXXX";
const char *tmpdir = NULL;
fileStatus *file = eStat (ExecutableProgram);
if (file->isSetuid)
tmpdir = getenv ("TMPDIR");
if (tmpdir == NULL)
tmpdir = TMPDIR;
name = xMalloc (strlen (tmpdir) + 1 + strlen (pattern) + 1, char);
sprintf (name, "%s%c%s", tmpdir, OUTPUT_PATH_SEPARATOR, pattern);
fd = mkstemp (name);
#elif defined(HAVE_TEMPNAM)
name = tempnam (TMPDIR, "tags");
if (name == NULL)
error (FATAL | PERROR, "cannot allocate temporary file name");
fd = open (name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
#else
name = xMalloc (L_tmpnam, char);
if (tmpnam (name) != name)
error (FATAL | PERROR, "cannot assign temporary file name");
fd = open (name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
#endif
if (fd == -1)
error (FATAL | PERROR, "cannot open temporary file");
fp = fdopen (fd, mode);
if (fp == NULL)
error (FATAL | PERROR, "cannot open temporary file");
DebugStatement (
debugPrintf (DEBUG_STATUS, "opened temporary file %s\n", name); )
Assert (*pName == NULL);
*pName = name;
return fp;
}
/* vi:set tabstop=8 shiftwidth=4: */

File Metadata

Mime Type
text/x-diff
Expires
Jul 4 2025, 7:12 PM (7 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3452657

Event Timeline