Fossil SCM

Renamed -th-nopic to -th-nosvg because nopic should arguably be nopik, but nopik looks/feels like a typo :/. #FirstWorldProblems

stephan 2020-09-13 19:35 pikchr-th
Commit 80f7c6c02578337ce01203666c7d964bfbf974616798cc07ce5e12fc78b56e68
1 file changed +4 -3
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -185,11 +185,11 @@
185185
** -th Process the input using TH1 before passing it to pikchr.
186186
**
187187
** -th-novar Disable $var and $<var> TH1 processing. Only applies
188188
** with the -th flag.
189189
**
190
-** -th-nopic When using -th, output the post-TH1'd script
190
+** -th-nosvg When using -th, output the post-TH1'd script
191191
** instead of the pikchr-rendered output.
192192
**
193193
** -th-trace Trace TH1 execution (for debugging purposes)
194194
**
195195
** TH1 Caveats: the built-in TH1 commands make some assumptions about
@@ -203,11 +203,11 @@
203203
Blob bOut = empty_blob;
204204
const char * zInfile = "-";
205205
const char * zOutfile = "-";
206206
const int fWithDiv = find_option("div",0,0)!=0;
207207
const int fTh1 = find_option("th",0,0)!=0;
208
- const int fNoPic = find_option("th-nopic",0,0)!=0;
208
+ const int fNosvg = find_option("th-nosvg",0,0)!=0;
209209
int isErr = 0;
210210
u32 fThFlags = TH_INIT_DEFAULT/* | TH_INIT_NO_ESC*/
211211
| (find_option("th-novar",0,0)!=0 ? TH_R2B_NO_VARS : 0);
212212
213213
Th_InitTraceLog()/*processes -th-trace flag*/;
@@ -235,11 +235,12 @@
235235
blob_reset(&bIn);
236236
bIn = out;
237237
}
238238
}
239239
if(!isErr){
240
- if(fTh1 && fNoPic){
240
+ if(fTh1 && fNosvg){
241
+ assert(0==blob_size(&bOut));
241242
bOut = bIn;
242243
bIn = empty_blob;
243244
}else{
244245
int w = 0, h = 0;
245246
const char * zContent = blob_str(&bIn);
246247
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -185,11 +185,11 @@
185 ** -th Process the input using TH1 before passing it to pikchr.
186 **
187 ** -th-novar Disable $var and $<var> TH1 processing. Only applies
188 ** with the -th flag.
189 **
190 ** -th-nopic When using -th, output the post-TH1'd script
191 ** instead of the pikchr-rendered output.
192 **
193 ** -th-trace Trace TH1 execution (for debugging purposes)
194 **
195 ** TH1 Caveats: the built-in TH1 commands make some assumptions about
@@ -203,11 +203,11 @@
203 Blob bOut = empty_blob;
204 const char * zInfile = "-";
205 const char * zOutfile = "-";
206 const int fWithDiv = find_option("div",0,0)!=0;
207 const int fTh1 = find_option("th",0,0)!=0;
208 const int fNoPic = find_option("th-nopic",0,0)!=0;
209 int isErr = 0;
210 u32 fThFlags = TH_INIT_DEFAULT/* | TH_INIT_NO_ESC*/
211 | (find_option("th-novar",0,0)!=0 ? TH_R2B_NO_VARS : 0);
212
213 Th_InitTraceLog()/*processes -th-trace flag*/;
@@ -235,11 +235,12 @@
235 blob_reset(&bIn);
236 bIn = out;
237 }
238 }
239 if(!isErr){
240 if(fTh1 && fNoPic){
 
241 bOut = bIn;
242 bIn = empty_blob;
243 }else{
244 int w = 0, h = 0;
245 const char * zContent = blob_str(&bIn);
246
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -185,11 +185,11 @@
185 ** -th Process the input using TH1 before passing it to pikchr.
186 **
187 ** -th-novar Disable $var and $<var> TH1 processing. Only applies
188 ** with the -th flag.
189 **
190 ** -th-nosvg When using -th, output the post-TH1'd script
191 ** instead of the pikchr-rendered output.
192 **
193 ** -th-trace Trace TH1 execution (for debugging purposes)
194 **
195 ** TH1 Caveats: the built-in TH1 commands make some assumptions about
@@ -203,11 +203,11 @@
203 Blob bOut = empty_blob;
204 const char * zInfile = "-";
205 const char * zOutfile = "-";
206 const int fWithDiv = find_option("div",0,0)!=0;
207 const int fTh1 = find_option("th",0,0)!=0;
208 const int fNosvg = find_option("th-nosvg",0,0)!=0;
209 int isErr = 0;
210 u32 fThFlags = TH_INIT_DEFAULT/* | TH_INIT_NO_ESC*/
211 | (find_option("th-novar",0,0)!=0 ? TH_R2B_NO_VARS : 0);
212
213 Th_InitTraceLog()/*processes -th-trace flag*/;
@@ -235,11 +235,12 @@
235 blob_reset(&bIn);
236 bIn = out;
237 }
238 }
239 if(!isErr){
240 if(fTh1 && fNosvg){
241 assert(0==blob_size(&bOut));
242 bOut = bIn;
243 bIn = empty_blob;
244 }else{
245 int w = 0, h = 0;
246 const char * zContent = blob_str(&bIn);
247

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button