nicolas / debian.moreutils (public) (License: GPL-2, GPL-2+, Expat, BSD-2-Clause, Public Domain) (since 2018-09-25) (hash sha1)
Debian packaging of joeyh's moreutils
List of commits:
Subject Hash Author Date (UTC)
Add errno --search-all-locale option 99153f44efacda0ebc3cd2eb42db0a36ef2145ad Lars Wirzenius 2012-06-05 20:42:47
Change how errno values are printed, for portability 65c141be411582e64baac599b2901741bcda5305 Lars Wirzenius 2012-06-05 17:09:29
Make errno obey locale 67f22bd1b6c2acfa5d23fa1821a0c9e895d085eb Lars Wirzenius 2012-06-05 14:14:07
Fix errno manpage to include --search in synopsis c373ee95a6670b73b3685c9792a4ae297f760527 Lars Wirzenius 2012-06-05 14:12:37
Add --search option to errno b876a119c477530b556e491c1a923212c3b0a67c Lars Wirzenius 2012-06-05 14:11:37
Add --help and add --list to manpage 563a442d63bab474b554453c6c3ccf10e3a5b48d Lars Wirzenius 2012-06-05 14:03:26
Add --list option to errno 3ebe87776f38e07343d79c14bc2dad3560bf5f8f Lars Wirzenius 2012-06-05 13:58:32
errno: New utility that looks up errno numbers or names. b2e99d6976f1163e674542c9c9f3a9242ace6ac2 Joey Hess 2012-06-04 15:52:01
let's inline the awk afe520ed30715628765e6b5f858d57af487358b6 Joey Hess 2012-06-04 15:48:19
Add errno manpage 66a2a6ace9fb99096c2a1d0144a7b12895db59e6 Lars Wirzenius 2012-06-04 13:22:42
Add copyright statement 2bc2887fefba2591bd6ede3a1eabbb6c26cf7a25 Lars Wirzenius 2012-06-04 13:22:25
Add errno to README 607d5d3888a3af319a06e9a1fd0e7e8aebd41d11 Lars Wirzenius 2012-06-04 13:14:39
Add errno program 9433d2b803644098ce690a52e1205c541d09eba5 Lars Wirzenius 2012-06-04 13:14:08
fix cleanup on error d6ef4a470f5ba8b7b36d39cd1cb2418d58257fc0 Joey Hess 2012-05-22 17:39:24
releasing version 0.46 d4f8bd597243c251d8528b5f6e5e1993dda42ccb Joey Hess 2012-04-10 15:48:31
cleanup 4549f5d3e3ac049668bd41b7d3de214c7826f69b Joey Hess 2012-04-09 20:19:20
combine: Avoid reading files twice, to support data coming from pipes. Closes: #667960 Thanks, Carsten Hey bbfa7f9a5d262d13c825005f89410f464148fd1d Joey Hess 2012-04-09 20:18:21
updated debian copyright format url b70bf8f3b34e03acfe4ed906929e1a3f2b42dd4b Joey Hess 2012-02-25 14:53:16
Typo. Closes: #649158 9991e280ec2364b4605c5b7371829af39c662043 Joey Hess 2011-11-18 17:37:25
releasing version 0.45 929dee9e4544801af94a68a4e4631484fff4a3f3 Joey Hess 2011-06-19 20:20:19
Commit 99153f44efacda0ebc3cd2eb42db0a36ef2145ad - Add errno --search-all-locale option
Author: Lars Wirzenius
Author date (UTC): 2012-06-05 20:42
Committer name: Lars Wirzenius
Committer date (UTC): 2012-06-05 20:42
Parent(s): 212ab4ba7c7d5ed1d4da75069fcaebfa74582180
Signer:
Signing key:
Signing status: N
Tree: a4971d69eb649a758ee3144fafeb482870b7f0af
File Lines added Lines deleted
errno.c 45 3
File errno.c changed (mode: 100644) (index 872d11a..fd130c1)
... ... search(int num_words, char **words)
100 100 } }
101 101
102 102
103 static void
104 search_all(int num_words, char **words)
105 {
106 FILE *f;
107
108 /* Static buffers are ugly, but they're simple. If anyone has a
109 locale name longer than a kilobyte, they will suffer, and they
110 will complain, and then I will fix this. */
111 char line[1024];
112
113 f = popen("locale -a", "r");
114 if (f == NULL) {
115 fprintf(stderr, "ERROR: Can't execute locale -a: %d: %s\n",
116 errno, strerror(errno));
117 exit(EXIT_FAILURE);
118 }
119
120 while (fgets(line, sizeof line, f) != NULL) {
121 line[strcspn(line, "\n")] = '\0';
122 setlocale(LC_ALL, line);
123 search(num_words, words);
124 }
125
126 fclose(f);
127 }
128
129
103 130 static struct option static struct option
104 131 options[] = { options[] = {
105 132 { "help", 0, NULL, 'h' }, { "help", 0, NULL, 'h' },
106 133 { "list", 0, NULL, 'l' }, { "list", 0, NULL, 'l' },
107 134 { "search", 0, NULL, 's' }, { "search", 0, NULL, 's' },
135 { "search-all-locales", 0, NULL, 'S' },
108 136 }; };
109 137
110 138
111 139 static void static void
112 140 usage(void) usage(void)
113 141 { {
114 printf("Usage: errno [-ls] [--list] [--search] [keyword]\n");
142 printf("Usage: errno [-lsS] [--list] [--search] [--search-all-locales] "
143 "[keyword]\n");
115 144 } }
116 145
117 146
 
... ... main(int argc, char **argv)
121 150 int i; int i;
122 151 int exit_code; int exit_code;
123 152 int index = 0; int index = 0;
124 enum { lookup_mode, list_mode, search_mode } mode = lookup_mode;
153 enum {
154 lookup_mode,
155 list_mode,
156 search_mode,
157 search_all_mode
158 } mode = lookup_mode;
125 159
126 160 setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
127 161
128 162 for (;;) { for (;;) {
129 int c = getopt_long(argc, argv, "hls", options, &index);
163 int c = getopt_long(argc, argv, "hlsS", options, &index);
130 164 if (c == -1) if (c == -1)
131 165 break; break;
132 166
 
... ... main(int argc, char **argv)
142 176 case 's': case 's':
143 177 mode = search_mode; mode = search_mode;
144 178 break; break;
179
180 case 'S':
181 mode = search_all_mode;
182 break;
145 183
146 184 case '?': case '?':
147 185 break; break;
 
... ... main(int argc, char **argv)
179 217 case search_mode: case search_mode:
180 218 search(argc - optind, argv + optind); search(argc - optind, argv + optind);
181 219 break; break;
220
221 case search_all_mode:
222 search_all(argc - optind, argv + optind);
223 break;
182 224 } }
183 225
184 226 return exit_code; return exit_code;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/nicolas/debian.moreutils

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/nicolas/debian.moreutils

Clone this repository using git:
git clone git://git.rocketgit.com/user/nicolas/debian.moreutils

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main