summaryrefslogtreecommitdiff
path: root/dselect/methparse.cc
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-02-27 09:44:08 +0100
committerGuillem Jover <guillem@debian.org>2015-04-10 04:23:56 +0200
commitd465dca48fb9c7c03aedf6fd8f266d22085d2bec (patch)
tree51002134f1b1e6206c988eb05bc7c77f791aa977 /dselect/methparse.cc
parent9929591b148577bec771400e003c820afcb9175d (diff)
downloaddpkg-d465dca48fb9c7c03aedf6fd8f266d22085d2bec.tar.gz
Consistently use proper quotation marks all over the place
That is "" or '', and not the unbalanced `' pair.
Diffstat (limited to 'dselect/methparse.cc')
-rw-r--r--dselect/methparse.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/dselect/methparse.cc b/dselect/methparse.cc
index b1e5ab755..bd634d740 100644
--- a/dselect/methparse.cc
+++ b/dselect/methparse.cc
@@ -50,13 +50,14 @@ struct method *methods = nullptr;
static void DPKG_ATTR_NORET
badmethod(const char *pathname, const char *why)
{
- ohshit(_("syntax error in method options file `%.250s' -- %s"), pathname, why);
+ ohshit(_("syntax error in method options file '%.250s' -- %s"), pathname, why);
}
static void DPKG_ATTR_NORET
eofmethod(const char *pathname, FILE *f, const char *why)
{
- if (ferror(f)) ohshite(_("error reading options file `%.250s'"),pathname);
+ if (ferror(f))
+ ohshite(_("error reading options file '%.250s'"), pathname);
badmethod(pathname,why);
}
@@ -90,7 +91,8 @@ void readmethods(const char *pathbase, dselect_option **optionspp, int *nread) {
delete[] pathbuf;
return;
}
- ohshite(_("unable to read `%.250s' directory for reading methods"),pathbuf);
+ ohshite(_("unable to read '%.250s' directory for reading methods"),
+ pathbuf);
}
debug(dbg_general, "readmethods('%s',...) directory open", pathbase);
@@ -107,7 +109,7 @@ void readmethods(const char *pathbase, dselect_option **optionspp, int *nread) {
if (c) continue;
methodlen= strlen(dent->d_name);
if (methodlen > IMETHODMAXLEN)
- ohshit(_("method `%.250s' has name that is too long (%d > %d characters)"),
+ ohshit(_("method '%.250s' has name that is too long (%d > %d characters)"),
dent->d_name, methodlen, IMETHODMAXLEN);
/* Check if there is a localized version of this method */
@@ -118,13 +120,14 @@ void readmethods(const char *pathbase, dselect_option **optionspp, int *nread) {
for (ccpp= methodprograms; *ccpp; ccpp++) {
strcpy(pathinmeth,*ccpp);
if (access(pathbuf,R_OK|X_OK))
- ohshite(_("unable to access method script `%.250s'"),pathbuf);
+ ohshite(_("unable to access method script '%.250s'"), pathbuf);
}
debug(dbg_general, " readmethods('%s',...) scripts ok", pathbase);
strcpy(pathinmeth,METHODOPTIONSFILE);
names= fopen(pathbuf,"r");
- if (!names) ohshite(_("unable to read method options file `%.250s'"),pathbuf);
+ if (!names)
+ ohshite(_("unable to read method options file '%.250s'"), pathbuf);
meth= new method;
meth->name= new char[strlen(dent->d_name)+1];
@@ -199,18 +202,18 @@ void readmethods(const char *pathbase, dselect_option **optionspp, int *nread) {
descfile= fopen(pathbuf,"r");
if (!descfile) {
if (errno != ENOENT)
- ohshite(_("unable to open option description file `%.250s'"),pathbuf);
+ ohshite(_("unable to open option description file '%.250s'"), pathbuf);
opt->description = nullptr;
} else { /* descfile != 0 */
if (fstat(fileno(descfile),&stab))
- ohshite(_("unable to stat option description file `%.250s'"),pathbuf);
+ ohshite(_("unable to stat option description file '%.250s'"), pathbuf);
opt->description= new char[stab.st_size+1]; errno=0;
size_t filelen = stab.st_size;
if (fread(opt->description,1,stab.st_size+1,descfile) != filelen)
- ohshite(_("failed to read option description file `%.250s'"),pathbuf);
+ ohshite(_("failed to read option description file '%.250s'"), pathbuf);
opt->description[stab.st_size]= 0;
if (ferror(descfile))
- ohshite(_("error during read of option description file `%.250s'"),pathbuf);
+ ohshite(_("error during read of option description file '%.250s'"), pathbuf);
fclose(descfile);
}
strcpy(pathinmeth,METHODOPTIONSFILE);
@@ -233,7 +236,7 @@ void readmethods(const char *pathbase, dselect_option **optionspp, int *nread) {
(*nread)++;
}
if (ferror(names))
- ohshite(_("error during read of method options file `%.250s'"),pathbuf);
+ ohshite(_("error during read of method options file '%.250s'"), pathbuf);
fclose(names);
}
closedir(dir);
@@ -256,7 +259,7 @@ void getcurrentopt() {
cmo= fopen(methoptfile,"r");
if (!cmo) {
if (errno == ENOENT) return;
- ohshite(_("unable to open current option file `%.250s'"),methoptfile);
+ ohshite(_("unable to open current option file '%.250s'"), methoptfile);
}
debug(dbg_general, "getcurrentopt() cmethopt open");
if (!fgets(methoptbuf,sizeof(methoptbuf),cmo)) { fclose(cmo); return; }
@@ -292,7 +295,7 @@ void writecurrentopt() {
file = atomic_file_new(methoptfile, (enum atomic_file_flags)0);
atomic_file_open(file);
if (fprintf(file->fp, "%s %s\n", coption->meth->name, coption->name) == EOF)
- ohshite(_("unable to write new option to `%.250s'"), file->name_new);
+ ohshite(_("unable to write new option to '%.250s'"), file->name_new);
atomic_file_close(file);
atomic_file_commit(file);
atomic_file_free(file);