summaryrefslogtreecommitdiff
path: root/src/tsort.c
AgeCommit message (Collapse)Author
2005-04-11(have_read_stdin): Remove; no longer needed. All usesPaul Eggert
removed. (tsort): Do not assume fopen can't return stdin. Close stdin before returning. All uses changed.
2005-03-06Remove `register' keyword.Jim Meyering
2004-11-17(main): Use getopt_long rather than getopt.Paul Eggert
2004-10-18(main): Remove declaration of unused local, opt.Jim Meyering
2004-09-21Remove now-unused long-options static var.Paul Eggert
(main): Use getopt where it suffices, not getopt_long.
2004-08-03(struct item, n_strings): Use size_t for sizes.Paul Eggert
(have_read_stdin, count_items, scan_zeros, detect_loop, recurse_tree, walk_tree, tsort, main): Use bool for booleans. (exit_status): Remove. (tsort): Return a success flag instead of storing into a global. (main): Use it.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-03-21(tsort): Reflect changes in use of readtoken.Jim Meyering
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(usage): Don't bother normalizing exit status since the arg is already the correct exit status now.
2003-11-05Cast NULL to `(char *)' in call to variadic function,Jim Meyering
parse_long_options, so that it works even on systems for which sizeof char* != sizeof int.
2003-11-02(new_item, record_relation): Use `sizeof *var' ratherJim Meyering
than `sizeof EXPLICIT_TYPE'. The former is more maintainable and usually shorter.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-04-24(tsort): Remove unnecessary test of have_read_stdin.Jim Meyering
(main): Minor syntactic clean-up.
2003-04-24(tsort): Fail if the input contains an odd number of tokens.Jim Meyering
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2001-12-01Reflect renaming to, and new usage of these macros:Jim Meyering
HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION.
2001-12-01(usage): Use new macros, EMIT_HELP_DESCRIPTION and EMIT_VERSION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23Factor out some common strings to make translation easier.Jim Meyering
Split usage strings so that --help and --version descriptions are alone in their own string. Likewise for the one that says: Mandatory arguments to long options are mandatory for short options too.
2001-11-11(count_items): Mark parameter as unused.Jim Meyering
2001-01-17(main): Use PACKAGE, not GNU_PACKAGE.Jim Meyering
2000-11-16Include sys/types.h before system.h.Jim Meyering
2000-08-23Include <config.h> unconditionally, to be consistentJim Meyering
with all the other programs in this directory.
2000-05-20Arrange to call close_stdout upon exit. Don't close stdout explicitly.Jim Meyering
2000-01-26(detect_loop): Update incomplete comment.Jim Meyering
From Mark Kettenis.
2000-01-25tsort now works more like the traditional UNIX tsort. Before it wouldJim Meyering
exit when it found a loop. Now it continues and outputs all items. (exit_status): New variable. (loop): New varibale. (count_items, scan_zeroes): Change return type to int. (detect_loop): Complete rewrite to correctly implement detection of loops. Also change return type to int. (recurse_tree): Stop if ACTION returns non-zero. This involves changing the return type of this function and ACTION to int. (walk_tree): Change return type of ACTION to int. (tsort): Continue sort after a loop has been detected (and broken). Set exit_status to 1 if a loop was detected. (main): Use exit_status to determine exit code.
1999-09-02Remove xstrdup declaration.Jim Meyering
1999-08-22(detect_loop): There's no loop if k->top is NULL.Jim Meyering
1999-08-22(usage): Correct bug-reporting email address.Jim Meyering
(tsort): Remove trailing `\n' in error format.
1999-05-04(search_item): Use `1' instead of `+1'. The latterJim Meyering
elicits a syntax error from SunOS4's cc. From Kaveh Ghazi.
1999-04-03Use AUTHORS in place of string in parse_long_options call.Jim Meyering
1999-04-03Insert AUTHORS definition.Jim Meyering
1999-04-03Use PROGRAM_NAME in place of string in parse_long_options call.Jim Meyering
1999-04-03define PROGRAM_NAMEJim Meyering
1999-03-04(main): Include author name argument in call to parse_long_options.Jim Meyering
1999-01-14Don't prototype usage as static.Jim Meyering
1999-01-02(tsort): Use a single call to error instead of two to fprintf.Jim Meyering
(main): Remove `%s: ' prefix on format string.
1999-01-02Move inclusion of assert.h to follow that of stdio.h.Jim Meyering
Some losing systems require this. Use STREQ macro instead of strcmp in a few places.
1999-01-02Include readtokens.h.Jim Meyering
(zeros): Rename global from `rr'. (getstr): Remove function. (tsort) Use readtoken instead of getstr.
1999-01-01Rename globals N and R so they don't shadow locals.Jim Meyering
(tsort): Rename from `sort'.
1999-01-01remove trailing blanksJim Meyering
1999-01-01from Mark KettenisJim Meyering