# by Dmitry V. Levin and Alexey Tourbin
# check the first line
0 string package
->1 regex \^package[\ \t]+[A-Za-z_]
->>1 regex \^package[\ \t]+[0-9A-Za-z_:]*\ *; Perl5 module source text
+0 regex \^package[\ \t]+[A-Za-z_]
+>0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text
# not 'p', check other lines
0 byte !0x70
>0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *;
#endif
#ifndef lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.117 2008/02/17 19:28:54 rrt Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.118 2008/02/17 23:40:48 rrt Exp $")
#endif /* lint */
#define EATAB {while (isascii((unsigned char) *l) && \
return -1;
}
m->vallen = slen;
+ if (m->type == FILE_PSTRING)
+ m->vallen++;
return 0;
case FILE_FLOAT:
case FILE_BEFLOAT:
#ifndef lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.109 2008/02/12 15:28:39 rrt Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.110 2008/02/17 19:28:54 rrt Exp $")
#endif /* lint */
private int match(struct magic_set *, struct magic *, uint32_t,
if (file_printf(ms, MAGIC_DESC, p->s) == -1)
return -1;
t = ms->offset + strlen(p->s);
+ if (m->type == FILE_PSTRING)
+ t++;
}
break;