56 |
g_free (data); |
g_free (data); |
57 |
data = NULL; |
data = NULL; |
58 |
} |
} |
|
|
|
59 |
} |
} |
60 |
|
|
61 |
typedef char *(*quote_func_t) (const char *name, int i); |
typedef char *(*quote_func_t) (const char *name, int i); |
416 |
if ((pp = strchr (content_string, '\n')) != 0) |
if ((pp = strchr (content_string, '\n')) != 0) |
417 |
*pp = 0; |
*pp = 0; |
418 |
|
|
419 |
if (islocal && !strncmp (content_string, filename, file_len)) { |
if (islocal) { |
420 |
/* Skip "filename: " */ |
if (!strncmp (content_string, filename, file_len)) { |
421 |
content_shift = file_len; |
/* Skip "filename: " */ |
422 |
if (content_string[content_shift] == ':') |
content_shift = file_len; |
423 |
for (content_shift++; |
if (content_string[content_shift] == ':') { |
424 |
|
content_shift++; |
425 |
|
/* Solaris' file prints tab after ':' */ |
426 |
|
for (content_shift++; |
427 |
|
content_string[content_shift] == ' ' |
428 |
|
|| content_string[content_shift] == '\t'; |
429 |
|
content_shift++); |
430 |
|
} |
431 |
|
} |
432 |
|
} else { |
433 |
|
if (!strncmp (content_string, "standard input:", 15)) { |
434 |
|
/* Skip "standard input: " */ |
435 |
|
for (content_shift = 15; |
436 |
content_string[content_shift] == ' '; |
content_string[content_shift] == ' '; |
437 |
content_shift++); |
content_shift++); |
438 |
} else if (!islocal |
} else if (!strncmp (content_string, "/dev/stdin:", 11)) { |
439 |
&& !strncmp (content_string, "standard input:", |
/* Skip "/dev/stdin: " */ |
440 |
15)) { |
for (content_shift = 11; |
441 |
/* Skip "standard input: " */ |
content_string[content_shift] == ' '; |
442 |
for (content_shift = 15; |
content_shift++); |
443 |
content_string[content_shift] == ' '; |
} |
|
content_shift++); |
|
|
} else if (!islocal |
|
|
&& !strncmp (content_string, "/dev/stdin:", |
|
|
11)) { |
|
|
/* Skip "/dev/stdin: " */ |
|
|
for (content_shift = 11; |
|
|
content_string[content_shift] == ' '; |
|
|
content_shift++); |
|
444 |
} |
} |
445 |
} else { |
} else { |
446 |
/* No data */ |
/* No data */ |
452 |
return -1; |
return -1; |
453 |
} |
} |
454 |
|
|
455 |
if (content_string && content_string[0] |
if (content_string[0] |
456 |
&& regexp_match (ptr, content_string + content_shift, |
&& regexp_match (ptr, content_string + content_shift, match_regex)) { |
|
match_regex)) { |
|
457 |
found = 1; |
found = 1; |
458 |
} |
} |
459 |
|
|