summaryrefslogtreecommitdiff
path: root/src/tsort.c
AgeCommit message (Collapse)Author
2007-10-07Use puts, rather than printf ("%s\n". Slightly cleaner.Jim Meyering
* src/tsort.c (tsort): ...and more efficient.
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-12(tsort): Use "%s" as the format string, rather than a diagnostic or a file name.Jim Meyering
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.