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
New colour canonification based on tree
[ypp-sc-tools.db-live.git]
/
pctb
/
convert.c
diff --git
a/pctb/convert.c
b/pctb/convert.c
index 89115481d1488a9d929509b5a16f90296eff14e0..ec91f82faefbbb5b8d70aba76a3ec1002e2a4db3 100644
(file)
--- a/
pctb/convert.c
+++ b/
pctb/convert.c
@@
-66,7
+66,9
@@
FILE *screenshot_file;
const char *o_ocean, *o_pirate;
int o_quiet;
const char *o_ocean, *o_pirate;
int o_quiet;
-enum flags o_flags= ff_dict_fetch|ff_dict_submit|ff_dict_pirate;
+enum flags o_flags=
+ ff_charset_allowedit |
+ ff_dict_fetch|ff_dict_submit|ff_dict_pirate;
static void vbadusage(const char *fmt, va_list) FMT(1,0) NORET;
static void vbadusage(const char *fmt, va_list al) {
static void vbadusage(const char *fmt, va_list) FMT(1,0) NORET;
static void vbadusage(const char *fmt, va_list al) {
@@
-123,11
+125,11
@@
void fetch_with_rsync(const char *stem) {
const char *src= getenv("YPPSC_PCTB_DICT_UPDATE");
char *remote= masprintf("%s/master-%s.txt", src, stem);
const char *src= getenv("YPPSC_PCTB_DICT_UPDATE");
char *remote= masprintf("%s/master-%s.txt", src, stem);
- char *local= masprintf("
#master-%s#
.txt", stem);
+ char *local= masprintf("
_master-%s
.txt", stem);
if (DEBUGP(rsync))
fprintf(stderr,"executing rsync to fetch %s to %s\n",remote,local);
execlp(rsync, "rsync",
if (DEBUGP(rsync))
fprintf(stderr,"executing rsync to fetch %s to %s\n",remote,local);
execlp(rsync, "rsync",
- DEBUGP(rsync) ? "-
vLt" : "-
Lt",
+ DEBUGP(rsync) ? "-
zvLt" : "-z
Lt",
"--",remote,local,(char*)0);
sysassert(!"exec rsync failed");
}
"--",remote,local,(char*)0);
sysassert(!"exec rsync failed");
}
@@
-195,7
+197,8
@@
int main(int argc, char **argv) {
else if (IS("--find-island")) o_flags |= ffs_printisland;
else if (IS("--single-page")) o_flags |= ff_singlepage;
else if (IS("--quiet")) o_quiet= 1;
else if (IS("--find-island")) o_flags |= ffs_printisland;
else if (IS("--single-page")) o_flags |= ff_singlepage;
else if (IS("--quiet")) o_quiet= 1;
- else if (IS("--edit-charset")) o_flags |= ff_editcharset;
+ else if (IS("--edit-charset")) o_flags |= ff_charset_edit;
+ else if (IS("--no-edit-charset")) o_flags &= ~(ffm_charset);
else if (IS("--test-servers")) o_flags |= ff_testservers;
else if (IS("--dict-local-only")) o_flags &= ~ffs_dict;
else if (IS("--dict-read-only")) o_flags &= (~ffs_dict | ff_dict_fetch);
else if (IS("--test-servers")) o_flags |= ff_testservers;
else if (IS("--dict-local-only")) o_flags &= ~ffs_dict;
else if (IS("--dict-read-only")) o_flags &= (~ffs_dict | ff_dict_fetch);
@@
-264,10
+267,12
@@
int main(int argc, char **argv) {
o_serv_dict_submit, o_flags & ff_dict_submit);
if (!o_screenshot_fn)
o_serv_dict_submit, o_flags & ff_dict_submit);
if (!o_screenshot_fn)
- o_screenshot_fn= masprintf("%s/
#pages#
.ppm",get_vardir());
+ o_screenshot_fn= masprintf("%s/
_pages
.ppm",get_vardir());
/* Actually do the work */
/* Actually do the work */
+ canon_colour_prepare();
+
if (o_mode & mf_findwindow) {
screenshot_startup();
find_yppclient_window();
if (o_mode & mf_findwindow) {
screenshot_startup();
find_yppclient_window();
@@
-305,7
+310,7
@@
int main(int argc, char **argv) {
}
if (o_mode & mf_analyse) {
if (o_flags & ff_needisland) {
}
if (o_mode & mf_analyse) {
if (o_flags & ff_needisland) {
- find_islandname(page
0_rgbimage
);
+ find_islandname(page
_images[0]->rgb
);
if (o_flags & ff_printisland)
printf("%s, %s\n", archipelago, island);
sysassert(! setenv("YPPSC_ISLAND",island,1) );
if (o_flags & ff_printisland)
printf("%s, %s\n", archipelago, island);
sysassert(! setenv("YPPSC_ISLAND",island,1) );