/*
* "$Id: textcommon.c 6649 2007-07-11 21:46:42Z mike $"
*
- * Common text filter routines for the Common UNIX Printing System (CUPS).
+ * Common text filter routines for CUPS.
*
- * Copyright 2007-2009 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
*/
#include "textcommon.h"
-#include <cups/i18n.h>
+#include <cups/language-private.h>
/*
if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
- _("Usage: %s job-id user title copies options [file]\n"),
+ _("Usage: %s job-id user title copies options [file]"),
name);
return (1);
}
num_options = cupsParseOptions(argv[5], 0, &options);
if ((val = cupsGetOption("prettyprint", num_options, options)) != NULL &&
- strcasecmp(val, "no") && strcasecmp(val, "off") &&
- strcasecmp(val, "false"))
+ _cups_strcasecmp(val, "no") && _cups_strcasecmp(val, "off") &&
+ _cups_strcasecmp(val, "false"))
{
PageLeft = 72.0f;
PageRight = PageWidth - 36.0f;
NumKeywords = 0;
Keywords = NULL;
}
- else if (strcasecmp(val, "application/x-cshell") == 0)
+ else if (_cups_strcasecmp(val, "application/x-cshell") == 0)
{
PrettyPrint = PRETTY_SHELL;
NumKeywords = sizeof(csh_keywords) / sizeof(csh_keywords[0]);
Keywords = csh_keywords;
}
- else if (strcasecmp(val, "application/x-csource") == 0)
+ else if (_cups_strcasecmp(val, "application/x-csource") == 0)
{
PrettyPrint = PRETTY_CODE;
NumKeywords = sizeof(code_keywords) / sizeof(code_keywords[0]);
Keywords = code_keywords;
}
- else if (strcasecmp(val, "application/x-perl") == 0)
+ else if (_cups_strcasecmp(val, "application/x-perl") == 0)
{
PrettyPrint = PRETTY_PERL;
NumKeywords = sizeof(perl_keywords) / sizeof(perl_keywords[0]);
Keywords = perl_keywords;
}
- else if (strcasecmp(val, "application/x-shell") == 0)
+ else if (_cups_strcasecmp(val, "application/x-shell") == 0)
{
PrettyPrint = PRETTY_SHELL;
NumKeywords = sizeof(sh_keywords) / sizeof(sh_keywords[0]);
if ((val = cupsGetOption("wrap", num_options, options)) == NULL)
WrapLines = 1;
else
- WrapLines = !strcasecmp(val, "true") || !strcasecmp(val, "on") ||
- !strcasecmp(val, "yes");
+ WrapLines = !_cups_strcasecmp(val, "true") || !_cups_strcasecmp(val, "on") ||
+ !_cups_strcasecmp(val, "yes");
if ((val = cupsGetOption("columns", num_options, options)) != NULL)
{
if (PageColumns < 1)
{
- _cupsLangPrintf(stderr, _("ERROR: Bad columns value %d\n"), PageColumns);
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad columns value %d."),
+ PageColumns);
return (1);
}
}
if (CharsPerInch <= 0.0)
{
- _cupsLangPrintf(stderr, _("ERROR: Bad cpi value %f\n"), CharsPerInch);
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad cpi value %f."),
+ CharsPerInch);
return (1);
}
}
if (LinesPerInch <= 0.0)
{
- _cupsLangPrintf(stderr, _("ERROR: Bad lpi value %f\n"), LinesPerInch);
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad lpi value %f."),
+ LinesPerInch);
return (1);
}
}
}
column ++;
- break;
+ break;
}
/*