projects
/
goodguy
/
history.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0ce1712
)
add xlat.C nodups options
author
Good Guy
<good1.2guy@gmail.com>
Thu, 14 Jul 2016 20:39:55 +0000
(14:39 -0600)
committer
Good Guy
<good1.2guy@gmail.com>
Thu, 14 Jul 2016 20:39:55 +0000
(14:39 -0600)
cinelerra-5.1/po/xlat.C
patch
|
blob
|
history
diff --git
a/cinelerra-5.1/po/xlat.C
b/cinelerra-5.1/po/xlat.C
index 7a38f2937956170924c92c0119c44143870e7db9..5227bcf5d9dca6043b962c325fe4d360d898fe72 100644
(file)
--- a/
cinelerra-5.1/po/xlat.C
+++ b/
cinelerra-5.1/po/xlat.C
@@
-509,7
+509,7
@@
void scan_po(FILE *ifp, FILE *ofp)
if( ifp != stdin ) fclose(ifp);
}
if( ifp != stdin ) fclose(ifp);
}
-void list_po(FILE *ifp, FILE *ofp)
+void list_po(FILE *ifp, FILE *ofp
, int xeqx = 0, int nnul = 0
)
{
int no = 0;
int dup = 0, nul = 0;
{
int no = 0;
int dup = 0, nul = 0;
@@
-546,8
+546,8
@@
void list_po(FILE *ifp, FILE *ofp)
xlat2(&tbfr[0], str); txt.append((const char*)str);
++no;
}
xlat2(&tbfr[0], str); txt.append((const char*)str);
++no;
}
- if( !txt.size() ) { ++nul; continue; }
- if( !key.compare(txt) ) { ++dup; continue; }
+ if(
nnul &&
!txt.size() ) { ++nul; continue; }
+ if(
xeqx &&
!key.compare(txt) ) { ++dup; continue; }
xlat4(key.c_str(), str);
fprintf(ofp, "%s,", (char *)str);
xlat4(txt.c_str(), str);
xlat4(key.c_str(), str);
fprintf(ofp, "%s,", (char *)str);
xlat4(txt.c_str(), str);
@@
-558,9
+558,10
@@
void list_po(FILE *ifp, FILE *ofp)
static void usage(const char *av0)
{
static void usage(const char *av0)
{
- printf("test csv %s csv < data.csv\n",av0);
- printf("test po %s po < data.po\n",av0);
- printf("get strings %s key < xgettext.po\n",av0);
+ printf("test csv %s csv < data.csv\n",av0);
+ printf("list po %s po < data.po\n",av0);
+ printf("list po %s nodups < data.po\n",av0);
+ printf("get strings %s key < xgettext.po\n",av0);
printf("gen xlation %s xlat xgettext.po xlat.csv\n",av0);
printf("gen xlation %s xlat - text,xlat ... < xgettext.po\n",av0);
exit(1);
printf("gen xlation %s xlat xgettext.po xlat.csv\n",av0);
printf("gen xlation %s xlat - text,xlat ... < xgettext.po\n",av0);
exit(1);
@@
-583,6
+584,11
@@
int main(int ac, char **av)
return 0;
}
return 0;
}
+ if( !strcmp(av[1],"nodups") ) { // test po
+ list_po(stdin, stdout, 1, 1);
+ return 0;
+ }
+
if( !strcmp(av[1],"po") ) { // test po
list_po(stdin, stdout);
return 0;
if( !strcmp(av[1],"po") ) { // test po
list_po(stdin, stdout);
return 0;