return NULL; \
}
- if ( *ptr == '!' )
- ptr++;
+ if (*ptr == '!')
+ ptr++;
+
+ do {
+ i = 0;
+ bzero(opt_name, sizeof(opt_name));
- do {
- i = 0;
- bzero(opt_name, sizeof(opt_name));
+ while (isalnum((int)*ptr) && i < sizeof(opt_name))
+ opt_name[i++] = *ptr++;
- while ( isalnum( (int) *ptr) && i < sizeof(opt_name))
- opt_name[i++] = *ptr++;
-
- i = 1;
- in_brackets = 0;
+ i = 1;
+ in_brackets = 0;
- if ( *ptr == '(' ) {
- in_brackets = 1;
- ptr++;
+ if (*ptr == '(') {
+ in_brackets = 1;
+ ptr++;
- }
- /* spaces are not allowed -- make sure there is no leading space. */
- if (isspace((int)*ptr)) {
- Handle_err;
+ /* spaces are not allowed -- make sure there is no leading space. */
- if ( isspace( (int) *ptr) ) {
++ if (isspace((int)*ptr)) {
++ Handle_err;
++ }
+ }
+
+ /* global options for a file */
+
+ if (strcmp(opt_name, "tzdiff") == 0) {
+ char negative = 0;
+
+ if (!in_brackets)
Handle_err;
+ if (*ptr == '-') {
+ negative = 1;
+ ptr++;
}
- }
-
- /* global options for a file */
-
- if ( strcmp(opt_name, "tzdiff") == 0 ) {
- char negative = 0;
-
- if ( ! in_brackets )
- Handle_err;
- if ( *ptr == '-' ) {
- negative = 1;
- ptr++;
- }
- if ( (ptr = get_num(ptr, &i, 24, 0, NULL)) == NULL )
- Handle_err;
- if ( negative )
- cl->cl_file->cf_tzdiff = (- i);
- else
- cl->cl_file->cf_tzdiff = i;
-
- if (debug_opt)
- fprintf(stderr, " Opt : \"%s\" (-)%d\n", opt_name, i);
- }
-
- /* options related to a line (or a set of lines) */
-
- else if ( strcmp(opt_name, "timezone") == 0 ) {
+ if ((ptr = get_num(ptr, &i, 24, 0, NULL)) == NULL)
+ Handle_err;
+ if (negative)
+ cl->cl_file->cf_tzdiff = (-i);
+ else
+ cl->cl_file->cf_tzdiff = i;
+
+ if (debug_opt)
+ fprintf(stderr, " Opt : \"%s\" (-)%d\n", opt_name, i);
+ }
+
+ /* options related to a line (or a set of lines) */
+
+ else if (strcmp(opt_name, "timezone") == 0) {
int len = -1;
- if ( ! in_brackets ) {
- Handle_err;
+ if (!in_brackets) {
+ Handle_err;
}
len = assign_option_string(&(cl->cl_tz), ptr);