]> git.pld-linux.org Git - packages/coreutils.git/blob - coreutils-getgid.patch
4f326e902ee06db6de4a0d4e074dcf97dbff6e2c
[packages/coreutils.git] / coreutils-getgid.patch
1 --- coreutils-6.10/man/Makefile.am.orig 2008-01-11 11:34:22.000000000 +0100
2 +++ coreutils-6.10/man/Makefile.am      2008-03-02 02:14:20.884410857 +0100
3 @@ -59,6 +59,7 @@
4  false.1:       $(common_dep)   $(srcdir)/false.x       ../src/false.c
5  fmt.1:         $(common_dep)   $(srcdir)/fmt.x         ../src/fmt.c
6  fold.1:                $(common_dep)   $(srcdir)/fold.x        ../src/fold.c
7 +getgid.1:      $(common_dep)   $(srcdir)/getgid.x      ../src/getgid.c
8  groups.1:      $(common_dep)   $(srcdir)/groups.x      ../src/groups.c
9  head.1:                $(common_dep)   $(srcdir)/head.x        ../src/head.c
10  hostid.1:      $(common_dep)   $(srcdir)/hostid.x      ../src/hostid.c
11 diff -Nur coreutils-4.5.3.orig/man/getgid.1 coreutils-4.5.3/man/getgid.1
12 --- coreutils-4.5.3.orig/man/getgid.1   Thu Jan  1 01:00:00 1970
13 +++ coreutils-4.5.3/man/getgid.1        Sun Oct 27 21:40:54 2002
14 @@ -0,0 +1,22 @@
15 +.TH GETGID "1" "October 2002" "getgid (coreutils) 4.5.3" "User Commands"
16 +.SH NAME
17 +getgid \- print ID of given group
18 +.SH SYNOPSIS
19 +.B getgid
20 +\fIGROUPNAME\fR
21 +.SH DESCRIPTION
22 +.PP
23 +Print group ID for GROUPNAME.
24 +.PP
25 +Without any OPTION, print usage information.
26 +.SH AUTHOR
27 +Written by Artur Frysiak.
28 +.SH "REPORTING BUGS"
29 +Report bugs to <feedback@pld-linux.org>.
30 +.SH COPYRIGHT
31 +Copyright \(co 1999 Artur Frysiak.
32 +.br
33 +This is free software; see the source for copying conditions.  There is NO
34 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35 +.SH "SEE ALSO"
36 +.BR id (1)
37 --- coreutils-4.5.3.orig/man/getgid.x   2007-02-13 17:29:53.000000000 +0100
38 +++ coreutils-4.5.3.orig/man/getgid.x   2008-08-08 20:54:14.890808765 +0200
39 @@ -0,0 +1,4 @@
40 +[NAME]
41 +getgid \- print ID of given group
42 +[DESCRIPTION]
43 +.\" Add any additional description here
44 diff -Nur coreutils-4.5.3.orig/man/pl/getgid.1 coreutils-4.5.3/man/pl/getgid.1
45 --- coreutils-4.5.3.orig/man/pl/getgid.1        Thu Jan  1 01:00:00 1970
46 +++ coreutils-4.5.3/man/pl/getgid.1     Sun Oct 27 21:46:48 2002
47 @@ -0,0 +1,22 @@
48 +.TH GETGID "1" "Pa¼dziernik 2002" "getgid (coreutils) 4.5.3" "Polecenia u¿ytkownika"
49 +.SH NAZWA
50 +getgid \- wypisuje identyfikator podanej grupy
51 +.SH SK£ADNIA
52 +.B getgid
53 +\fINAZWA-GRUPY\fR
54 +.SH OPIS
55 +.PP
56 +Wypisuje identyfikator grupy NAZWA-GRUPY.
57 +.PP
58 +Bez ¿adnych opcji podaje sposób u¿ycia.
59 +.SH AUTOR
60 +Napisane przez Artura Frysiaka.
61 +.SH "ZG£ASZANIE B£ÊDÓW"
62 +B³êdy proszê zg³aszaæ (w jêz. polskim lub angielskim) pod <feedback@pld-linux.org>.
63 +.SH COPYRIGHT
64 +Copyright \(co 1999 Artur Frysiak.
65 +.br
66 +This is free software; see the source for copying conditions.  There is NO
67 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
68 +.SH ZOBACZ TAK¯E
69 +.BR id (1)
70 --- coreutils-6.10/src/Makefile.am.orig 2008-03-02 02:12:29.418058752 +0100
71 +++ coreutils-6.10/src/Makefile.am      2008-03-02 02:14:46.205853844 +0100
72 @@ -69,6 +69,7 @@
73    false                \
74    fmt          \
75    fold         \
76 +  getgid       \
77    ginstall     \
78    groups       \
79    head         \
80 diff -Nur coreutils-4.5.3.orig/src/getgid.c coreutils-4.5.3/src/getgid.c
81 --- coreutils-4.5.3.orig/src/getgid.c   Thu Jan  1 01:00:00 1970
82 +++ coreutils-4.5.3/src/getgid.c        Sun Oct 27 21:52:01 2002
83 @@ -0,0 +1,106 @@
84 +/* getgid - print GID of given group
85 +   Copyright (C) 1999 Artur Frysiak <wiget@pld-linux.org>
86 +
87 +   This program is free software; you can redistribute it and/or modify
88 +   it under the terms of the GNU General Public License as published by
89 +   the Free Software Foundation; either version 2, or (at your option)
90 +   any later version.
91 +
92 +   This program is distributed in the hope that it will be useful,
93 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
94 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
95 +   GNU General Public License for more details.
96 +
97 +   You should have received a copy of the GNU General Public License
98 +   along with this program; if not, write to the Free Software Foundation,
99 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
100 +
101 +#include <config.h>
102 +#include <grp.h>
103 +#include <sys/types.h>
104 +#include <getopt.h>
105 +#include "system.h"
106 +#include "quote.h"
107 +#include "error.h"
108 +
109 +#define PROGRAM_NAME "getgid"
110 +
111 +#define AUTHORS proper_name ("Artur Frysiak")
112 +
113 +/* The name by which this program was run. */
114 +const char *program_name;
115 +
116 +static struct option const longopts[] =
117 +{
118 +  {GETOPT_HELP_OPTION_DECL},
119 +  {GETOPT_VERSION_OPTION_DECL},
120 +  {NULL, 0, NULL, 0}
121 +};
122 +
123 +void
124 +usage (int status)
125 +{
126 +  if (status != EXIT_SUCCESS)
127 +    fprintf (stderr, _("Try `%s --help' for more information.\n"),
128 +             program_name);
129 +  else
130 +    {
131 +      printf (_("\
132 +Usage: %s [OPTION]... [GROUPNAME]...\n\
133 +"),
134 +              program_name);
135 +      fputs (_("\
136 +Prints ID of given group name.\
137 +\n\
138 +"), stdout);
139 +      fputs (HELP_OPTION_DESCRIPTION, stdout);
140 +      fputs (VERSION_OPTION_DESCRIPTION, stdout);
141 +      emit_bug_reporting_address ();
142 +    }
143 +  exit (status);
144 +}
145 +
146 +int main(int argc, char **argv)
147 +{
148 +       struct group    *gr;
149 +       int             optc;
150 +
151 +       initialize_main (&argc, &argv);
152 +       program_name = argv[0];
153 +
154 +       setlocale (LC_ALL, "");
155 +       bindtextdomain (PACKAGE, LOCALEDIR);
156 +       textdomain (PACKAGE);
157 +
158 +       atexit (close_stdout);
159 +
160 +       while ((optc = getopt_long (argc, argv, "+", longopts, NULL)) != -1) {
161 +               switch (optc) {
162 +                       case_GETOPT_HELP_CHAR;
163 +                       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
164 +               default:
165 +                       usage (EXIT_FAILURE);
166 +               }
167 +       }
168 +
169 +       if (argc < optind + 1)
170 +       {
171 +               error (0, 0, _("missing operand"));
172 +               usage (EXIT_FAILURE);
173 +       }
174 +
175 +       if (optind + 2 < argc)
176 +       {
177 +               error (0, 0, _("extra operand %s"), quote (argv[optind + 2]));
178 +               usage (EXIT_FAILURE);
179 +       }
180 +
181 +       gr = getgrnam(argv[optind]);
182 +       if (gr == NULL) {
183 +               error (0, 0, _("cannot find group name %s"), quote(argv[optind]));
184 +               exit(EXIT_FAILURE);
185 +       } else
186 +               printf("%lu\n", (unsigned long int) gr->gr_gid);
187 +       exit(EXIT_SUCCESS);
188 +}
189 +
190 --- coreutils-4.5.3/po/POTFILES.in.orig Mon Jul  1 23:26:55 2002
191 +++ coreutils-4.5.3/po/POTFILES.in      Fri Nov  1 02:25:41 2002
192 @@ -61,6 +61,7 @@
193  src/false.c
194  src/fmt.c
195  src/fold.c
196 +src/getgid.c
197  src/getlimits.c
198  src/group-list.c
199  src/groups.c
200 --- coreutils-6.10/po/pl.po.orig        2008-03-02 02:12:29.526064907 +0100
201 +++ coreutils-6.10/po/pl.po     2008-03-02 02:15:20.139787629 +0100
202 @@ -4152,6 +4152,15 @@
203  msgid "invalid number of columns: %s"
204  msgstr "b³êdna liczba kolumn: %s"
205  
206 +#: src/getgid.c:37
207 +#, c-format
208 +msgid ""
209 +"Usage:\n"
210 +"\t%s groupname\n"
211 +msgstr ""
212 +"Składnia:\n"
213 +"\t%s nazwa-grupy\n"
214 +
215  #. This is a proper name. See the gettext manual, section Names.
216  #: src/getlimits.c:29 src/timeout.c:74 src/truncate.c:42
217  msgid "Padraig Brady"
218
This page took 0.061485 seconds and 2 git commands to generate.