diff options
| -rw-r--r-- | src/widget-encodings.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/widget-encodings.c b/src/widget-encodings.c index f4600f2..c06a694 100644 --- a/src/widget-encodings.c +++ b/src/widget-encodings.c | |||
| @@ -180,6 +180,7 @@ bindle_widget_encodings( | |||
| 180 | int method ) | 180 | int method ) |
| 181 | { | 181 | { |
| 182 | int c; | 182 | int c; |
| 183 | int rc; | ||
| 183 | int opt_index; | 184 | int opt_index; |
| 184 | const char * str; | 185 | const char * str; |
| 185 | 186 | ||
| @@ -288,8 +289,14 @@ bindle_widget_encodings( | |||
| 288 | fflush(stdout); | 289 | fflush(stdout); |
| 289 | 290 | ||
| 290 | if ((str)) | 291 | if ((str)) |
| 291 | return(bindle_widget_encodings_string(cnf, method, str)); | 292 | rc = bindle_widget_encodings_string(cnf, method, str); |
| 292 | return(bindle_widget_encodings_stdin(cnf, method)); | 293 | else |
| 294 | rc = bindle_widget_encodings_stdin(cnf, method); | ||
| 295 | |||
| 296 | if ((cnf->widget_flags & BINDLE_FLG_NEWLINE)) | ||
| 297 | write(bindle_fdout, "\n", strlen("\n")); | ||
| 298 | |||
| 299 | return(rc); | ||
| 293 | } | 300 | } |
| 294 | 301 | ||
| 295 | 302 | ||
| @@ -319,12 +326,6 @@ bindle_widget_encodings_stdin( | |||
| 319 | return(1); | 326 | return(1); |
| 320 | }; | 327 | }; |
| 321 | 328 | ||
| 322 | if ((cnf->widget_flags & BINDLE_FLG_NEWLINE)) | ||
| 323 | { | ||
| 324 | bindle_strlcpy(res, "\n", sizeof(res)); | ||
| 325 | write(bindle_fdout, res, strlen(res)); | ||
| 326 | }; | ||
| 327 | |||
| 328 | return(0); | 329 | return(0); |
| 329 | } | 330 | } |
| 330 | 331 | ||
| @@ -365,12 +366,6 @@ bindle_widget_encodings_string( | |||
| 365 | }; | 366 | }; |
| 366 | }; | 367 | }; |
| 367 | 368 | ||
| 368 | if ((cnf->widget_flags & BINDLE_FLG_NEWLINE)) | ||
| 369 | { | ||
| 370 | bindle_strlcpy(res, "\n", sizeof(res)); | ||
| 371 | write(bindle_fdout, res, strlen(res)); | ||
| 372 | }; | ||
| 373 | |||
| 374 | return(0); | 369 | return(0); |
| 375 | } | 370 | } |
| 376 | 371 | ||
