MCPcopy Index your code
hub / github.com/GJDuck/e9patch / parseProtection

Function parseProtection

src/e9patch/e9json.cpp:1041–1051  ·  view source on GitHub ↗

* Parse a protection. */

Source from the content-addressed store, hash-verified

1039 * Parse a protection.
1040 */
1041static int parseProtection(const Parser &parser, unsigned i, char c, int prot)
1042{
1043 const char *str = parser.s;
1044 if (str[i] == c)
1045 return prot;
1046 else if (str[i] == '-')
1047 return 0;
1048 else
1049 parse_error(parser, "failed to parse protection string \"%s\"; "
1050 "expected `%c' or '-', found `%c'", str, c, str[i]);
1051}
1052
1053/*
1054 * Parse a parameter object.

Callers 1

parseParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected