14 #ifdef NEED_SIGNAL_CATCHER 30 #ifdef NEED_SIGNAL_CATCHER 35 signal_catcher (
int signum)
37 if (sig_cinfo != NULL) {
38 if (sig_cinfo->err != NULL)
39 sig_cinfo->err->trace_level = 0;
51 signal(SIGINT, signal_catcher);
54 signal(SIGTERM, signal_catcher);
65 #ifdef PROGRESS_REPORT 76 if (total_passes > 1) {
77 fprintf(stderr,
"\rPass %d/%d: %3d%% ",
79 total_passes, percent_done);
81 fprintf(stderr,
"\r %3d%% ", percent_done);
92 if (cinfo->err->trace_level == 0) {
93 progress->
pub.progress_monitor = progress_monitor;
97 cinfo->progress = &progress->
pub;
106 if (cinfo->err->trace_level == 0) {
107 fprintf(stderr,
"\r \r");
125 register int nmatched = 0;
127 while ((ca = *arg++) !=
'\0') {
128 if ((ck = *keyword++) ==
'\0')
137 if (nmatched < minchars)
151 FILE * input_file = stdin;
154 setmode(fileno(stdin), O_BINARY);
157 if ((input_file = fdopen(fileno(stdin),
READ_BINARY)) == NULL) {
158 fprintf(stderr,
"Cannot reopen stdin\n");
169 FILE * output_file = stdout;
172 setmode(fileno(stdout), O_BINARY);
175 if ((output_file = fdopen(fileno(stdout),
WRITE_BINARY)) == NULL) {
176 fprintf(stderr,
"Cannot reopen stdout\n");
keymatch(char *arg, const char *keyword, int minchars)
struct jpeg_progress_mgr pub
int completed_extra_passes
struct cdjpeg_progress_mgr * cd_progress_ptr
jpeg_destroy(j_common_ptr cinfo)