parsedb().
+Sun Jan 14 12:29:46 CST 2001 Adam Heath <doogie@debian.org>
+
+ * lib/mlib.c, lib/fields.c, lib/parse.c, main/help.c, main/main.c,
+ po/dpkg.pot: Fix -Wall messages. Also, fix handling of user-defined
+ fields in parsedb().
+
Sun Jan 14 02:46:14 CST 2001 Adam Heath <doogie@debian.org>
* po/dpkg.pot: Bring up to date.
const char **endpp)
{
const char *ep;
- int c, l;
+ int c, l = 0;
ep= startp;
if (!*ep) parseerr(0,filename,lno, warnto,warncount,pigp,0, _("%s is missing"),what);
} else {
ohshit(_("subprocess %s failed with wait status code %d"),description,status);
}
+ return -1;
}
int waitsubproc(pid_t pid, const char *description, int sigpipeok, int warn) {
/* warnto, warncount and donep may be null.
* If donep is not null only one package's information is expected.
*/
- static char readbuf[16384];
int fd;
struct pkginfo newpig, *pigp;
int fieldencountered[NFIELDS];
const struct fieldinfo *fip;
const struct nickname *nick;
- const char *fieldname;
char *data, *dataptr, *endptr;
const char *fieldstart, *valuestart;
char *value= NULL;
_("user-defined field name `%.*s' too short"), fieldstart,fieldlen);
larpp= &newpifp->arbs;
while ((arp= *larpp) != 0) {
- if (!strncasecmp(arp->name,fieldname,fieldlen))
+ if (!strncasecmp(arp->name,fieldstart,fieldlen))
parseerr(0,filename,lno, warnto,warncount,&newpig,0,
- _("duplicate value for user-defined field `%.*s'"), fieldname,fieldlen);
+ _("duplicate value for user-defined field `%.*s'"), fieldstart,fieldlen);
larpp= &arp->next;
}
arp= nfmalloc(sizeof(struct arbitraryfield));
int maintainer_script_installed(struct pkginfo *pkg, const char *scriptname,
const char *description, ...) {
/* all ...'s are const char*'s */
- const char *scriptpath, *scriptexec;
+ const char *scriptpath;
char *const *arglist;
struct stat stab;
va_list ap;
- int c1;
char buf[100];
scriptpath= pkgadminfile(pkg,scriptname);
const char *scriptname, const char *description,
const char *cidir, char *cidirrest, ...) {
char *const *arglist;
- const char *scriptexec;
struct stat stab;
va_list ap;
char buf[100];
- int c1;
va_start(ap,cidirrest);
arglist= vbuildarglist(scriptname,ap);
const char *scriptname, const char *description,
const char *cidir, char *cidirrest,
const char *ifok, const char *iffallback) {
- const char *oldscriptpath, *scriptexec;
+ const char *oldscriptpath;
char *const *arglist;
struct stat stab;
- int c1, n, status;
char buf[100];
- pid_t r;
oldscriptpath= pkgadminfile(pkg,scriptname);
arglist= buildarglist(scriptname,
jmp_buf ejbuf;
struct varbuf linevb;
const char * pipein;
- const char **newargs, **oldargs= NULL;
+ const char **newargs;
char *ptr, *endptr;
FILE *in;
- int argc= 1, mode= 0, c, lno= 0, infd, i;
+ int c, lno, infd, i;
static void (*actionfunction)(const char *const *argv);
if ((pipein= *argv++) == NULL) badusage(_("--command-fd takes 1 argument, not 0"));
if ((in= fdopen(infd, "r")) == NULL)
ohshite(_("couldn't open `%i' for stream"), infd);
+ if (setjmp(ejbuf)) { /* expect warning about possible clobbering of argv */
+ error_unwind(ehflag_bombout); exit(2);
+ }
varbufinit(&linevb);
- for (;;argc= 1,mode= 0) {
- if (setjmp(ejbuf)) { /* expect warning about possible clobbering of argv */
- error_unwind(ehflag_bombout); exit(2);
- }
+ for (;;lno= 0) {
+ const char **oldargs= NULL;
+ int argc= 1, mode= 0;
+ lno= 0;
push_error_handler(&ejbuf,print_error_fatal,0);
do { c= getc(in); if (c == '\n') lno++; } while (c != EOF && isspace(c));
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-01-14 02:41-0600\n"
+"POT-Creation-Date: 2001-01-14 12:29-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "subprocess %s failed with wait status code %d"
msgstr ""
-#: lib/mlib.c:131
+#: lib/mlib.c:132
#, c-format
msgid "wait for %s failed"
msgstr ""
-#: lib/mlib.c:179
+#: lib/mlib.c:180
#, c-format
msgid "failed in buffer_write(fd) (%i, ret=%i, %s)"
msgstr ""
-#: lib/mlib.c:186
+#: lib/mlib.c:187
#, c-format
msgid "eof in buffer_write(stream): %s"
msgstr ""
-#: lib/mlib.c:188
+#: lib/mlib.c:189
#, c-format
msgid "error in buffer_write(stream): %s"
msgstr ""
-#: lib/mlib.c:194
+#: lib/mlib.c:195
#, c-format
msgid "unknown data type `%i' in buffer_write\n"
msgstr ""
-#: lib/mlib.c:210
+#: lib/mlib.c:211
#, c-format
msgid "failed in buffer_read(fd): %s"
msgstr ""
-#: lib/mlib.c:217
+#: lib/mlib.c:218
#, c-format
msgid "error in buffer_read(stream): %s"
msgstr ""
-#: lib/mlib.c:220
+#: lib/mlib.c:221
#, c-format
msgid "unknown data type `%i' in buffer_read\n"
msgstr ""
-#: lib/mlib.c:267
+#: lib/mlib.c:268
#, c-format
msgid "failed to allocate buffer in buffer_copy (%s)"
msgstr ""
-#: lib/mlib.c:298
+#: lib/mlib.c:299
#, c-format
msgid "failed in buffer_copy (%s)"
msgstr ""
msgid "-%c option does not take a value"
msgstr ""
-#: lib/parse.c:106
+#: lib/parse.c:104
#, c-format
msgid "failed to open package info file `%.255s' for reading"
msgstr ""
-#: lib/parse.c:111
+#: lib/parse.c:109
#, c-format
msgid "can't stat package info file `%.255s'"
msgstr ""
-#: lib/parse.c:115
+#: lib/parse.c:113
#, c-format
msgid "can't mmap package info file `%.255s'"
msgstr ""
-#: lib/parse.c:118
+#: lib/parse.c:116
#, c-format
msgid "failed to malloc for info file `%.255s'"
msgstr ""
-#: lib/parse.c:120
+#: lib/parse.c:118
#, c-format
msgid "copy info file `%.255s'"
msgstr ""
-#: lib/parse.c:149
+#: lib/parse.c:147
#, c-format
msgid "EOF after field name `%.*s'"
msgstr ""
-#: lib/parse.c:152
+#: lib/parse.c:150
#, c-format
msgid "newline in field name `%.*s'"
msgstr ""
-#: lib/parse.c:155
+#: lib/parse.c:153
#, c-format
msgid "MSDOS EOF (^Z) in field name `%.*s'"
msgstr ""
-#: lib/parse.c:158
+#: lib/parse.c:156
#, c-format
msgid "field name `%.*s' must be followed by colon"
msgstr ""
-#: lib/parse.c:166
+#: lib/parse.c:164
#, c-format
msgid "EOF before value of field `%.*s' (missing final newline)"
msgstr ""
-#: lib/parse.c:170
+#: lib/parse.c:168
#, c-format
msgid "MSDOS EOF char in value of field `%.*s' (missing newline?)"
msgstr ""
-#: lib/parse.c:183
+#: lib/parse.c:181
#, c-format
msgid "EOF during value of field `%.*s' (missing final newline)"
msgstr ""
-#: lib/parse.c:206
+#: lib/parse.c:204
#, c-format
msgid "duplicate value for `%s' field"
msgstr ""
-#: lib/parse.c:211
+#: lib/parse.c:209
#, c-format
msgid "user-defined field name `%.*s' too short"
msgstr ""
-#: lib/parse.c:216
+#: lib/parse.c:214
#, c-format
msgid "duplicate value for user-defined field `%.*s'"
msgstr ""
-#: lib/parse.c:229
+#: lib/parse.c:227
msgid "several package info entries found, only one allowed"
msgstr ""
-#: lib/parse.c:257
+#: lib/parse.c:255
msgid "Configured-Version for package with inappropriate Status"
msgstr ""
-#: lib/parse.c:271
+#: lib/parse.c:269
msgid "Package which in state not-installed has conffiles, forgetting them"
msgstr ""
-#: lib/parse.c:326
+#: lib/parse.c:324
#, c-format
msgid "failed to close after read: `%.255s'"
msgstr ""
-#: lib/parse.c:327
+#: lib/parse.c:325
#, c-format
msgid "no package information in `%.255s'"
msgstr ""
msgid "unable to set execute permissions on `%.250s'"
msgstr ""
-#: main/help.c:293
+#: main/help.c:292
#, c-format
msgid "unable to stat installed %s script `%.250s'"
msgstr ""
-#: main/help.c:295 main/help.c:355 main/help.c:375
+#: main/help.c:294 main/help.c:350 main/help.c:370
#, c-format
msgid "unable to execute %s"
msgstr ""
-#: main/help.c:321
+#: main/help.c:318
#, c-format
msgid "unable to stat new %s script `%.250s'"
msgstr ""
-#: main/help.c:323
+#: main/help.c:320
#, c-format
msgid "unable to execute new %s"
msgstr ""
-#: main/help.c:344
+#: main/help.c:339
#, c-format
msgid "old %s script"
msgstr ""
-#: main/help.c:352
+#: main/help.c:347
#, c-format
msgid "dpkg: warning - unable to stat %s `%.250s': %s\n"
msgstr ""
-#: main/help.c:359
+#: main/help.c:354
msgid "dpkg - trying script from the new package instead ...\n"
msgstr ""
-#: main/help.c:366
+#: main/help.c:361
#, c-format
msgid "new %s script"
msgstr ""
-#: main/help.c:370
+#: main/help.c:365
msgid "there is no script in the new version of the package - giving up"
msgstr ""
-#: main/help.c:372
+#: main/help.c:367
#, c-format
msgid "unable to stat %s `%.250s'"
msgstr ""
-#: main/help.c:376
+#: main/help.c:371
msgid "dpkg: ... it looks like that went OK.\n"
msgstr ""
#. Huh ?
-#: main/help.c:471
+#: main/help.c:466
#, c-format
msgid "failed to rmdir/unlink `%.255s'"
msgstr ""
-#: dpkg-deb/info.c:52 main/help.c:475
+#: dpkg-deb/info.c:52 main/help.c:470
msgid "failed to exec rm for cleanup"
msgstr ""
msgid "couldn't open `%i' for stream"
msgstr ""
-#: main/main.c:456
+#: main/main.c:459
#, c-format
msgid "unexpected eof before end of line %d"
msgstr ""
-#: dpkg-deb/main.c:155 main/main.c:495 main/main.c:539 split/main.c:163
+#: dpkg-deb/main.c:155 main/main.c:498 main/main.c:542 split/main.c:163
msgid "need an action option"
msgstr ""