buf[i] = 0;
}
-/* SYMBOL's name features[0] [1] for checking for applying
- ------------- --------------- ------------ ------------
- SCRIPT [0] [0] any|any all all
- SCRIPT= NULL [0] none&1 none all
- SCRIPT+ [0] NULL 1&none all none
- SCRIPT=F1 [F1,0] [0] F1&1 F1 all
- SCRIPT+F1 [0] [F1,0] none&F1 none F1
- SCRIPT=F1+ [F1,0] NULL F1&none F1 none
- SCRIPT=~F2 [-1,F2,0] [0] ~F2&1 all~F2 all
- SCRIPT=F1,~F2 [F1,-1,A2,0][0] F1&~F2&1 F1 (*1) all
+/* SYMBOL's name features[0] [1] for checking for applying
+ ------------- ------------------ ------------ ------------
+ SCRIPT [-1,0] [-1,0] any|any all all
+ SCRIPT= NULL [-1,0] none&1 none all
+ SCRIPT+ [-1,0] NULL 1&none all none
+ SCRIPT=F1 [F1,0] [-1,0] F1&1 F1 all
+ SCRIPT+F1 [-1][0] [F1,0] none&F1 none F1
+ SCRIPT=F1+ [F1,0] NULL F1&none F1 none
+ SCRIPT=~F2 [-1,F2,0] [-1,0] ~F2&1 all~F2 all
+ SCRIPT=F1,~F2 [F1,-1,A2,0][-1,0] F1&~F2&1 F1 (*1) all
(*1) Invalid specification
*/
for (i = 0; i < 2; i++)
if (feature_count[i])
{
- spec->features[i] = malloc (sizeof (int) * (feature_count[i] + 1));
+ spec->features[i] = malloc (sizeof (int)
+ * (feature_count[i] < 0 ? 2
+ : feature_count[i] + 1));
if (! spec->features[i])
return -2;
if (feature_count[i] > 0)
otf_store_features (features[i] + 1, features[i + 1],
spec->features[i]);
else
- spec->features[i][1] = 0;
+ spec->features[i][0] = 0xFFFFFFFF, spec->features[i][1] = 0;
}
return 0;