Add option to specify second type

(to mix mimetype and ext)
This commit is contained in:
Nikita Ivanov 2022-06-10 11:59:12 +05:00
parent ee2746e240
commit a6388d3950
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -118,7 +118,6 @@ static int preview_type_ext(char **ext)
static int preview_type_mime_part(char **s)
{
*s = NULL;
NOT_ACCEPT(TOK_STAR);
Token t = token;
@ -148,12 +147,13 @@ static int new_preview(void)
Token name = token;
EXPECT(TOK_STR);
char *type = NULL;
char *subtype = NULL;
char *ext = NULL;
char *type = NULL, *subtype = NULL, *ext = NULL;
CHECK_OK(preview_type(&type, &subtype, &ext));
if (accept(TOK_BLK_OPEN) == STAT_NULL) {
CHECK_OK(preview_type(&type, &subtype, &ext));
EXPECT(TOK_BLK_OPEN);
}
Token script = token;
EXPECT(TOK_STR);