MCPcopy Index your code
hub / github.com/RsyncProject/rsync / log_format_has

Function log_format_has

log.c:793–813  ·  view source on GitHub ↗

Return 1 if the format escape is in the log-format string (e.g. look for * the 'b' in the "%9b" format escape). */

Source from the content-addressed store, hash-verified

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). */
793int 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

Callers 3

parse_argumentsFunction · 0.85
client_runFunction · 0.85
rsync_moduleFunction · 0.85

Calls 1

isDigitFunction · 0.85

Tested by

no test coverage detected