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
Use compressed _master-pixmap.txt.gz
[ypp-sc-tools.db-live.git]
/
pctb
/
rgbimage.c
diff --git
a/pctb/rgbimage.c
b/pctb/rgbimage.c
index 720e5dce78d398ed7f8fdfc8f1dde353a1532cf4..81eddf9898e83427a83f7376bef93868e8a4dc56 100644
(file)
--- a/
pctb/rgbimage.c
+++ b/
pctb/rgbimage.c
@@
-50,9
+50,9
@@
static int identify1(const RgbImage *base, Rect portion,
char result[MAXIMGIDENT], const char *what,
static int identify1(const RgbImage *base, Rect portion,
char result[MAXIMGIDENT], const char *what,
- const char *which) {
- char *dbfile_name= masprintf("
#%s-pixmap#
.txt",which);
- if (!
dbfile_open
(dbfile_name))
+ const char *which
, int (*opener)(const char *fn)
) {
+ char *dbfile_name= masprintf("
_%s-pixmap
.txt",which);
+ if (!
opener
(dbfile_name))
goto not_found;
#define FGETSLINE (dbfile_getsline(result,MAXIMGIDENT,__FILE__,__LINE__))
goto not_found;
#define FGETSLINE (dbfile_getsline(result,MAXIMGIDENT,__FILE__,__LINE__))
@@
-111,8
+111,8
@@
static int identify1(const RgbImage *base, Rect portion,
static int identify(const RgbImage *base, Rect portion,
char result[MAXIMGIDENT], const char *what) {
static int identify(const RgbImage *base, Rect portion,
char result[MAXIMGIDENT], const char *what) {
- return identify1(base,portion,result,what, "master") ||
- identify1(base,portion,result,what, "local");
+ return identify1(base,portion,result,what, "master"
, dbfile_gzopen
) ||
+ identify1(base,portion,result,what, "local"
, dbfile_open
);
}
void fwrite_ppmraw(FILE *f, const RgbImage *ri) {
}
void fwrite_ppmraw(FILE *f, const RgbImage *ri) {
@@
-146,7
+146,8
@@
void identify_rgbimage(const RgbImage *base, Rect portion,
static int synced;
if (!synced) {
static int synced;
if (!synced) {
- fetch_with_rsync("pixmap");
+ if (o_flags & ff_dict_fetch)
+ fetch_with_rsync_gz("pixmap");
synced++;
}
synced++;
}