* Parse a protection. */
| 1039 | * Parse a protection. |
| 1040 | */ |
| 1041 | static 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. |