mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-02-17 19:10:46 +01:00
Add option to specify second type
(to mix mimetype and ext)
This commit is contained in:
parent
ee2746e240
commit
a6388d3950
@ -118,7 +118,6 @@ static int preview_type_ext(char **ext)
|
|||||||
|
|
||||||
static int preview_type_mime_part(char **s)
|
static int preview_type_mime_part(char **s)
|
||||||
{
|
{
|
||||||
*s = NULL;
|
|
||||||
NOT_ACCEPT(TOK_STAR);
|
NOT_ACCEPT(TOK_STAR);
|
||||||
|
|
||||||
Token t = token;
|
Token t = token;
|
||||||
@ -148,12 +147,13 @@ static int new_preview(void)
|
|||||||
Token name = token;
|
Token name = token;
|
||||||
EXPECT(TOK_STR);
|
EXPECT(TOK_STR);
|
||||||
|
|
||||||
char *type = NULL;
|
char *type = NULL, *subtype = NULL, *ext = NULL;
|
||||||
char *subtype = NULL;
|
|
||||||
char *ext = NULL;
|
|
||||||
CHECK_OK(preview_type(&type, &subtype, &ext));
|
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);
|
EXPECT(TOK_BLK_OPEN);
|
||||||
|
}
|
||||||
|
|
||||||
Token script = token;
|
Token script = token;
|
||||||
EXPECT(TOK_STR);
|
EXPECT(TOK_STR);
|
||||||
|
Loading…
Reference in New Issue
Block a user