Return 1 if the format escape is in the log-format string (e.g. look for * the 'b' in the "%9b" format escape). */
| 791 | /* Return 1 if the format escape is in the log-format string (e.g. look for |
| 792 | * the 'b' in the "%9b" format escape). */ |
| 793 | int log_format_has(const char *format, char esc) |
| 794 | { |
| 795 | const char *p; |
| 796 | |
| 797 | if (!format) |
| 798 | return 0; |
| 799 | |
| 800 | for (p = format; (p = strchr(p, '%')) != NULL; ) { |
| 801 | for (p++; *p == '\''; p++) {} /*SHARED ITERATOR*/ |
| 802 | if (*p == '-') |
| 803 | p++; |
| 804 | while (isDigit(p)) |
| 805 | p++; |
| 806 | while (*p == '\'') p++; |
| 807 | if (!*p) |
| 808 | break; |
| 809 | if (*p == esc) |
| 810 | return 1; |
| 811 | } |
| 812 | return 0; |
| 813 | } |
| 814 | |
| 815 | /* Log the transfer of a file. If the code is FCLIENT, the output just goes |
| 816 | * to stdout. If it is FLOG, it just goes to the log file. Otherwise we |
no test coverage detected