Fossil SCM
Renamed -th-nopic to -th-nosvg because nopic should arguably be nopik, but nopik looks/feels like a typo :/. #FirstWorldProblems
Commit
80f7c6c02578337ce01203666c7d964bfbf974616798cc07ce5e12fc78b56e68
Parent
dd4b87c0bc8c4ef…
1 file changed
+4
-3
+4
-3
| --- src/pikchrshow.c | ||
| +++ src/pikchrshow.c | ||
| @@ -185,11 +185,11 @@ | ||
| 185 | 185 | ** -th Process the input using TH1 before passing it to pikchr. |
| 186 | 186 | ** |
| 187 | 187 | ** -th-novar Disable $var and $<var> TH1 processing. Only applies |
| 188 | 188 | ** with the -th flag. |
| 189 | 189 | ** |
| 190 | -** -th-nopic When using -th, output the post-TH1'd script | |
| 190 | +** -th-nosvg When using -th, output the post-TH1'd script | |
| 191 | 191 | ** instead of the pikchr-rendered output. |
| 192 | 192 | ** |
| 193 | 193 | ** -th-trace Trace TH1 execution (for debugging purposes) |
| 194 | 194 | ** |
| 195 | 195 | ** TH1 Caveats: the built-in TH1 commands make some assumptions about |
| @@ -203,11 +203,11 @@ | ||
| 203 | 203 | Blob bOut = empty_blob; |
| 204 | 204 | const char * zInfile = "-"; |
| 205 | 205 | const char * zOutfile = "-"; |
| 206 | 206 | const int fWithDiv = find_option("div",0,0)!=0; |
| 207 | 207 | 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; | |
| 209 | 209 | int isErr = 0; |
| 210 | 210 | u32 fThFlags = TH_INIT_DEFAULT/* | TH_INIT_NO_ESC*/ |
| 211 | 211 | | (find_option("th-novar",0,0)!=0 ? TH_R2B_NO_VARS : 0); |
| 212 | 212 | |
| 213 | 213 | Th_InitTraceLog()/*processes -th-trace flag*/; |
| @@ -235,11 +235,12 @@ | ||
| 235 | 235 | blob_reset(&bIn); |
| 236 | 236 | bIn = out; |
| 237 | 237 | } |
| 238 | 238 | } |
| 239 | 239 | if(!isErr){ |
| 240 | - if(fTh1 && fNoPic){ | |
| 240 | + if(fTh1 && fNosvg){ | |
| 241 | + assert(0==blob_size(&bOut)); | |
| 241 | 242 | bOut = bIn; |
| 242 | 243 | bIn = empty_blob; |
| 243 | 244 | }else{ |
| 244 | 245 | int w = 0, h = 0; |
| 245 | 246 | const char * zContent = blob_str(&bIn); |
| 246 | 247 |
| --- 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 |