}
void
-FaxModem::correctPhaseCData(u_char* buf, u_long* pBufSize,
+FaxModem::correctPhaseCData(u_char* buf, uint32* pBufSize,
u_int fillorder, const Class2Params& params)
{
MemoryDecoder dec1(buf, params.pageWidth(), *pBufSize, fillorder, params.is2D());
#include <netinet/in.h>
}
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
TypeRule::TypeRule() {}
TypeRule::~TypeRule() {}
TypeRule::TypeRule(const TypeRule& other)
}
static const char* typeNames[] =
- { "ascii", "string", "address", "byte", "short", "long" };
+ { "ascii", "asciiesc", "string", "address", "byte", "short", "long" };
static const char* opNames[] =
{ "<any>", "=", "!=", "<", "<=", ">", ">=", "&", "^", "!" };
static const char* resultNames[] = { "tiff", "postscript", "error" };
);
if (type == STRING)
printf(" \"%s\"", value.s);
- else if (type != ASCII) {
+ else if (type != ASCII && type != ASCIIESC) {
if (op == ANY)
printf(" <any value>");
else
}
ok = true;
goto done;
+ case ASCIIESC:
+ u_int i;
+ for (i = 0; i < size; i++)
+ if (!isprint(cp[i]) && !isspace(cp[i]) && cp[i] != '\033') {
+ if (verbose)
+ printf("failed (unprintable char %#x)\n", cp[i]);
+ return (FALSE);
+ }
+ ok = TRUE;
+ goto done;
case STRING:
ok = (strncmp((const char*)(cp+off), value.s,
fxmin((u_int) strlen(value.s), (u_int)(size-off))) == 0);
rule.type = TypeRule::STRING;
else if (strncasecmp(tp, "ascii", cp-tp) == 0)
rule.type = TypeRule::ASCII;
+ else if (strncasecmp(tp, "asciiesc", cp-tp) == 0)
+ rule.type = TypeRule::ASCIIESC;
else if (strncasecmp(tp, "addr", cp-tp) == 0)
rule.type = TypeRule::ADDR;
else {
cp++;
rule.op = TypeRule::EQ; // default is '='
const char* vp = cp;
- if (rule.type != TypeRule::STRING && rule.type != TypeRule::ASCII) {
+ if (rule.type != TypeRule::STRING && rule.type != TypeRule::ASCII
+ && rule.type != TypeRule::ASCIIESC) {
// numeric value
switch (*vp) {
case '=': rule.op = TypeRule::EQ; cp++; break;
>15 string binary error binary IRIS Inventor file
>15 string ascii ps %F/textfmt -B -f Courier-Bold\
-Ml=0.4in -p 11 -s %s >%o <%i
+#
+# Japanization (should help other iso-2022 variants too)
+#
+#>15 string asciiesc ps a2ps-j -l '' -p -ns -nt <%i >%o
+#0 asciiesc x ps a2ps-j -l '' -p -ns -nt <%i >%o
+#
+
#
# This causes anything else with ascii-only data to be treated as text.
#