/*
- * "$Id: testppd.c 6676 2007-07-16 17:09:09Z mike $"
+ * "$Id: testppd.c 6936 2007-09-10 18:15:36Z mike $"
*
* PPD test program for the Common UNIX Printing System (CUPS).
*
"} stopped cleartomark\n";
static const char *custom_code =
- "[{\n"
- "%%BeginFeature: *CustomPageSize True\n"
- "400\n"
- "500\n"
- "0\n"
- "0\n"
- "0\n"
- "PageSize=Custom\n"
- "%%EndFeature\n"
- "} stopped cleartomark\n"
"[{\n"
"%%BeginFeature: *InputSlot Tray\n"
"InputSlot=Tray\n"
"[{\n"
"%%BeginFeature: *StringOption None\n"
"%%EndFeature\n"
+ "} stopped cleartomark\n"
+ "[{\n"
+ "%%BeginFeature: *CustomPageSize True\n"
+ "400\n"
+ "500\n"
+ "0\n"
+ "0\n"
+ "0\n"
+ "PageSize=Custom\n"
+ "%%EndFeature\n"
"} stopped cleartomark\n";
printf("FAIL (\"%s\" instead of \"La Long Foo Reason\")\n", buffer);
}
- ppdClose(ppd);
+ putenv("LANG=zh_TW");
+
+ fputs("ppdLocalizeIPPReason(zh_TW text): ", stdout);
+ if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
+ !strcmp(buffer, "Number 1 Foo Reason"))
+ puts("PASS");
+ else
+ {
+ status ++;
+ printf("FAIL (\"%s\" instead of \"Number 1 Foo Reason\")\n", buffer);
+ }
}
else
{
attr = (ppd_attr_t *)cupsArrayNext(ppd->sorted_attrs))
printf(" *%s %s/%s: \"%s\"\n", attr->name, attr->spec,
attr->text, attr->value ? attr->value : "");
-
- ppdClose(ppd);
}
}
+#ifdef __APPLE__
+ if (getenv("MallocStackLogging") && getenv("MallocStackLoggingNoCompact"))
+ {
+ char command[1024]; /* malloc_history command */
+
+ snprintf(command, sizeof(command), "malloc_history %d -all_by_size",
+ getpid());
+ fflush(stdout);
+ system(command);
+ }
+#endif /* __APPLE__ */
+
+ ppdClose(ppd);
+
return (status);
}
/*
- * End of "$Id: testppd.c 6676 2007-07-16 17:09:09Z mike $".
+ * End of "$Id: testppd.c 6936 2007-09-10 18:15:36Z mike $".
*/