Paul Eggert
6a0a1919c7
(print_user): Don't assume uid fits in unsigned int.
...
(print_group): Likewise, for gid.
2005-07-08 22:55:44 +00:00
Paul Eggert
db3e479ab3
(getpwuid, getgrgid, getuid, getgid, geteuid, getegid)
...
[!defined _POSIX_VERSION]: Remove decls.
2005-05-30 07:33:00 +00:00
Jim Meyering
44d59bb168
Update FSF postal mail address.
2005-05-14 07:58:31 +00:00
Jim Meyering
c0c815af8d
Update FSF postal mail address.
2005-05-14 06:57:06 +00:00
Jim Meyering
74e3e13b3a
Remove register keyword.
2005-03-06 16:19:44 +00:00
Jim Meyering
b4fb292a82
remove trailing blank
2004-09-22 19:59:20 +00:00
Paul Eggert
81ca57a91d
Remove unused "case 0".
2004-09-21 22:26:42 +00:00
Paul Eggert
2cfb3f4502
(print_full_info): Don't exit with failure status simply
...
because a user or group number can't be turned into a name.
2004-09-13 10:43:21 +00:00
Paul Eggert
3c838e94e5
(use_name, main, print_user, xgetgroups, print_group_list,
...
print_full_info): Use bool for booleans.
(problems): Remove, replacing with....
(ok): New var (inverted from old sense).
(print_user, print_group, print_full_info):
Print uids/gids with %lu, not %u.
(xgetgroups): Don't run out of memory if getgroups or getugroups
returns -1.
2004-08-03 06:27:09 +00:00
Jim Meyering
1ce7b61d0e
(main): Standardize on the diagnostics given when someone gives
...
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-06-21 15:03:35 +00:00
Jim Meyering
1c4154dbb0
(xgetgroups): Use variable name, rather than type name in computing buffer
...
size for xnmalloc.
2004-05-06 14:46:00 +00:00
Jim Meyering
76ef73f50a
(xgetgroups): Use xnmalloc, rather than xmalloc.
...
Don't add `1' to the buffer size (it was to protect against malloc
implementations that fail to allocate a buffer of size zero).
That is no longer necessary, since we use a malloc wrapper
on such systems.
2004-05-06 14:43:31 +00:00
Jim Meyering
23b3e06c44
(usage): Use EXIT_SUCCESS, not 0, for clarity.
...
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
(main): Don't assume EXIT_FAILURE == 1, as POSIX doesn't require it.
(problems): Now a boolean int, not a counter,
so that we don't have to worry about int overflow. All uses changed.
2004-01-21 23:10:54 +00:00
Jim Meyering
cf4fdf373f
Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
...
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-10-18 10:05:47 +00:00
Jim Meyering
bafd927f03
(WRITTEN_BY): Rename from AUTHORS.
...
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
2003-09-18 22:19:03 +00:00
Jim Meyering
c6ec144494
revert previous change
2003-09-18 19:39:12 +00:00
Jim Meyering
3280bf4b55
Update AUTHORS definition to be a comma-separated list of strings and/or update
...
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-09-18 18:22:23 +00:00
Jim Meyering
4f4e9aa8e1
Don't include headers already included by system.h:
...
Don't include closeout.h.
2003-07-23 07:29:54 +00:00
Jim Meyering
6bcd4b08ba
(main): Call initialize_main.
2003-06-17 18:13:23 +00:00
Jim Meyering
6c93bdeeaa
Remove anachronistic casts of xmalloc,
...
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-04-11 10:51:56 +00:00
Jim Meyering
7c740a55c6
Remove Arnold Robbins' obsolete e-mail address
...
from `written by...' comment, at his request.
2003-03-27 22:40:37 +00:00
Jim Meyering
a5f14f167e
Remove all uses of `PARAMS'.
2002-12-15 20:54:29 +00:00
Jim Meyering
c81581d5c3
(print_full_info, print_group_list): Add casts to avoid
...
warnings about `signed and unsigned type in conditional expression'.
2002-09-14 07:45:53 +00:00
Jim Meyering
4006f4e672
Change exit (0)' to exit (EXIT_SUCCESS)',
...
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-31 08:52:10 +00:00
Jim Meyering
7488703199
Change error (1, ...' to error (EXIT_FAILURE, ...'.
2002-08-30 23:04:53 +00:00
Jim Meyering
2ee11887cd
(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.
2002-07-02 09:09:10 +00:00
Jim Meyering
2fae9e5d26
Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
...
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.
2001-12-15 20:46:30 +00:00
Jim Meyering
1e4a6cbe1c
(AUTHORS): Mark string for translation, since it contains the English word `and'.
2001-08-14 07:10:10 +00:00
Jim Meyering
69e30c7f2a
Move dcls of globals used only in main...
...
(main): ...to here.
(usage): Clarify option descriptions.
2000-12-02 22:16:41 +00:00
Jim Meyering
9abfcc500a
`id -Gn' (invoked by groups) would fail without giving a diagnostic
...
on malconfigured systems.
(print_user): Give a diagnostic if number->name lookup fails.
(print_group): Likewise.
2000-06-26 06:32:58 +00:00
Jim Meyering
52150ef51d
Include "closeout.h".
...
(main): Call atexit with close_stdout.
2000-05-07 14:54:43 +00:00
Jim Meyering
fdd07e3d2b
No longer include long-options.h.
...
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
1999-03-31 05:52:46 +00:00
Jim Meyering
03c1b8518c
(PROGRAM_NAME, AUTHORS): Define and use.
1999-03-31 04:16:08 +00:00
Jim Meyering
713d9932c3
(print_user): Use uid_t instead of int.
...
(print_group): Use gid_t instead of int.
1999-03-27 14:29:51 +00:00
Jim Meyering
d7176770d4
*** empty log message ***
1999-03-10 15:34:45 +00:00
Jim Meyering
959eb64fb4
(xgetgroups): Take new parameter, gid, and pass it to getugroups.
...
(print_group_list): Call getpwuid and adjust calls to xgetgroups
to include new parameter.
1999-03-09 16:08:19 +00:00
Jim Meyering
5b2aa1846b
Include long-options.h.
...
[long_options]: Remove the "help" and "version" entries.
Remove declarations of show_help and show_version.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
1999-03-06 15:28:54 +00:00
Jim Meyering
22099863b4
(usage): Remove static attribute.
...
Move function be the first in the file.
1999-01-25 14:27:48 +00:00
Jim Meyering
24a8bf2d3e
update bug-reporting address
1998-09-19 17:32:35 +00:00
Jim Meyering
f3c14cb59f
revert back to using lower case _unlocked wrapper names
1998-06-29 16:24:01 +00:00
Jim Meyering
c5eb9edf26
Change all uses of unlocked-wrapped functions to their upper case wrapper names.
1998-06-29 02:13:21 +00:00
Jim Meyering
a3db75c4b3
add comments on #endif's
1998-02-03 08:28:43 +00:00
Jim Meyering
46fb234f5f
(xgetgroups): Guard function defn with #if HAVE_GETGROUPS.
1998-02-03 08:27:48 +00:00
Jim Meyering
2e308957d4
s/__P/PARAMS/
1997-12-21 22:30:30 +00:00
Jim Meyering
62fed0f3a2
Don't include limits.h or sys/param.h.
1997-12-21 22:21:10 +00:00
Jim Meyering
b3ab88e970
Remove old-style xmalloc and xrealloc decls.
1997-10-25 22:03:20 +00:00
Jim Meyering
5db3c9bdb4
update bug-reporting address
1997-10-07 23:51:39 +00:00
Jim Meyering
9080de09fc
indent cpp-directives
1997-05-01 20:51:16 +00:00
Jim Meyering
899a90bfd9
bracket bug address with <> and append a period
1997-02-01 04:23:31 +00:00
Jim Meyering
b8c82a8e39
Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call.
1997-02-01 03:05:36 +00:00