chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cope with very small commodity lists.
[ypp-sc-tools.db-live.git]
/
pctb
/
convert.c
diff --git
a/pctb/convert.c
b/pctb/convert.c
index ac3ceb3e44e2bf6910cdc6aa76fbacef24f3369d..e262b26c858b0ea0dda3da03a0549933be9d33fd 100644
(file)
--- a/
pctb/convert.c
+++ b/
pctb/convert.c
@@
-47,11
+47,11
@@
static enum {
mode_all= 0111,
} o_mode= mode_all;
mode_all= 0111,
} o_mode= mode_all;
-static char *o_screenshot
s
_fn;
+static char *o_screenshot_fn;
static int o_single_page, o_quiet;
static const char *o_outputmode= "upload";
static int o_single_page, o_quiet;
static const char *o_outputmode= "upload";
-FILE *screenshot
s
_file;
+FILE *screenshot_file;
static void vbadusage(const char *fmt, va_list) FMT(1,0) NORET;
static void vbadusage(const char *fmt, va_list) FMT(1,0) NORET;
@@
-63,11
+63,11
@@
static void vbadusage(const char *fmt, va_list al) {
}
DEFINE_VWRAPPERF(static, badusage, NORET);
}
DEFINE_VWRAPPERF(static, badusage, NORET);
-static void open_screenshot
s
_file(const char *mode) {
- screenshot
s_file= fopen(o_screenshots
_fn, mode);
- if (!screenshot
s
_file)
+static void open_screenshot_file(const char *mode) {
+ screenshot
_file= fopen(o_screenshot
_fn, mode);
+ if (!screenshot_file)
fatal("could not open screenshots file `%s': %s",
fatal("could not open screenshots file `%s': %s",
- o_screenshot
s
_fn, strerror(errno));
+ o_screenshot_fn, strerror(errno));
}
static void run_analysis(void) {
}
static void run_analysis(void) {
@@
-121,8
+121,8
@@
int main(int argc, char **argv) {
!strcmp(arg,"--tsv") ||
!strcmp(arg,"--best-prices"))
o_outputmode= arg+2;
!strcmp(arg,"--tsv") ||
!strcmp(arg,"--best-prices"))
o_outputmode= arg+2;
- else if (!strcmp(arg,"--screenshot
s
-file"))
- o_screenshot
s
_fn= ARGVAL;
+ else if (!strcmp(arg,"--screenshot-file"))
+ o_screenshot_fn= ARGVAL;
#define DF(f) \
else if (!strcmp(arg,"-D" #f)) \
debug_flags |= dbg_##f;
#define DF(f) \
else if (!strcmp(arg,"-D" #f)) \
debug_flags |= dbg_##f;
@@
-137,8
+137,8
@@
int main(int argc, char **argv) {
badusage("unknown option `%s'",arg);
}
badusage("unknown option `%s'",arg);
}
- if (!o_screenshot
s
_fn) {
- r= asprintf(&o_screenshot
s
_fn,"%s/#pages#.ppm",get_vardir());
+ if (!o_screenshot_fn) {
+ r= asprintf(&o_screenshot_fn,"%s/#pages#.ppm",get_vardir());
sysassert(r>=0);
}
sysassert(r>=0);
}
@@
-147,12
+147,12
@@
int main(int argc, char **argv) {
find_yppclient_window();
}
if (o_mode & mf_screenshot) {
find_yppclient_window();
}
if (o_mode & mf_screenshot) {
- open_screenshot
s
_file("w");
+ open_screenshot_file("w");
if (o_single_page) take_one_screenshot();
else take_screenshots();
}
if (o_mode & mf_readscreenshot) {
if (o_single_page) take_one_screenshot();
else take_screenshots();
}
if (o_mode & mf_readscreenshot) {
- open_screenshot
s
_file("r");
+ open_screenshot_file("r");
if (o_single_page) read_one_screenshot();
else read_screenshots();
}
if (o_single_page) read_one_screenshot();
else read_screenshots();
}