- int c;
-
- c = lex_look_ahead (lexer);
- if (c == '"' || c == '\'')
- {
- lex_get (lexer);
- if (!lex_force_string (lexer))
- return CMD_FAILURE;
- if (*title)
- free (*title);
- *title = ds_xstrdup (lex_tokstr (lexer));
- lex_get (lexer);
- if (lex_token (lexer) != '.')
- {
- msg (SE, _("%s: `.' expected after string."), cmd);
- return CMD_FAILURE;
- }
- }
- else
- {
- char *cp;
-
- if (*title)
- free (*title);
- *title = xstrdup (lex_rest_of_line (lexer));
- lex_discard_line (lexer);
- for (cp = *title; *cp; cp++)
- *cp = toupper ((unsigned char) (*cp));
- }
+ if (!lex_force_string (lexer))
+ return CMD_FAILURE;
+ set_title (lex_tokcstr (lexer), type);
+ lex_get (lexer);