- Update to 1.6.6
- Reset maintainership as I have no intention to maintain this anymore PR: ports/189011 Submitted by: Boris Samorodov <bsam at passap.ru>
This commit is contained in:
parent
2ba11be767
commit
09fcd1e1cc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=354317
@ -2,14 +2,13 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= enscript
|
||||
PORTVERSION= 1.6.4
|
||||
PORTREVISION= 6
|
||||
PORTVERSION= 1.6.6
|
||||
CATEGORIES+= print
|
||||
MASTER_SITES= http://www.codento.com/people/mtr/genscript/
|
||||
MASTER_SITES= GNU
|
||||
PKGNAMESUFFIX= -${PAPERSIZE}
|
||||
DISTNAME= enscript-${PORTVERSION}
|
||||
|
||||
MAINTAINER?= rafan@FreeBSD.org
|
||||
MAINTAINER?= ports@FreeBSD.org
|
||||
COMMENT= ASCII to PostScript filter
|
||||
|
||||
USES= shebangfix perl5
|
||||
@ -32,4 +31,7 @@ PS?= Letter
|
||||
@${FALSE}
|
||||
.endif
|
||||
|
||||
post-configure:
|
||||
${REINPLACE_CMD} -e 's|/usr/bin/perl|$${prefix}/bin/perl|g' ${WRKSRC}/scripts/Makefile
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (enscript-1.6.4.tar.gz) = 45299a4db47c9c08c3649d4f62b211ae79ef5143360c264a40371a728f6ad99b
|
||||
SIZE (enscript-1.6.4.tar.gz) = 1036734
|
||||
SHA256 (enscript-1.6.6.tar.gz) = 6d56bada6934d055b34b6c90399aa85975e66457ac5bf513427ae7fc77f5c0bb
|
||||
SIZE (enscript-1.6.6.tar.gz) = 1330493
|
||||
|
@ -1,94 +0,0 @@
|
||||
Patch for CVE-2008-3863 and CVE-2008-4306
|
||||
|
||||
Obtained from: http://cvs.fedoraproject.org/viewvc/devel/enscript/enscript-CVE-2008-3863%2BCVE-2008-4306.patch?revision=1.1
|
||||
|
||||
--- src/psgen.c
|
||||
+++ src/psgen.c 2008-10-29 10:43:08.512598143 +0100
|
||||
@@ -24,6 +24,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
+#include <limits.h>
|
||||
#include "gsint.h"
|
||||
|
||||
/*
|
||||
@@ -124,7 +125,7 @@ struct gs_token_st
|
||||
double xscale;
|
||||
double yscale;
|
||||
int llx, lly, urx, ury; /* Bounding box. */
|
||||
- char filename[512];
|
||||
+ char filename[PATH_MAX];
|
||||
char *skipbuf;
|
||||
unsigned int skipbuf_len;
|
||||
unsigned int skipbuf_pos;
|
||||
@@ -135,11 +136,11 @@ struct gs_token_st
|
||||
Color bgcolor;
|
||||
struct
|
||||
{
|
||||
- char name[512];
|
||||
+ char name[PATH_MAX];
|
||||
FontPoint size;
|
||||
InputEncoding encoding;
|
||||
} font;
|
||||
- char filename[512];
|
||||
+ char filename[PATH_MAX];
|
||||
} u;
|
||||
};
|
||||
|
||||
@@ -248,7 +249,7 @@ static int do_print = 1;
|
||||
static int user_fontp = 0;
|
||||
|
||||
/* The user ^@font{}-defined font. */
|
||||
-static char user_font_name[256];
|
||||
+static char user_font_name[PATH_MAX];
|
||||
static FontPoint user_font_pt;
|
||||
static InputEncoding user_font_encoding;
|
||||
|
||||
@@ -978,7 +979,8 @@ large for page\n"),
|
||||
FATAL ((stderr,
|
||||
_("user font encoding can be only the system's default or `ps'")));
|
||||
|
||||
- strcpy (user_font_name, token.u.font.name);
|
||||
+ memset (user_font_name, 0, sizeof(user_font_name));
|
||||
+ strncpy (user_font_name, token.u.font.name, sizeof(user_font_name) - 1);
|
||||
user_font_pt.w = token.u.font.size.w;
|
||||
user_font_pt.h = token.u.font.size.h;
|
||||
user_font_encoding = token.u.font.encoding;
|
||||
@@ -1444,7 +1446,7 @@ read_special_escape (InputStream *is, To
|
||||
buf[i] = ch;
|
||||
if (i + 1 >= sizeof (buf))
|
||||
FATAL ((stderr, _("too long argument for %s escape:\n%.*s"),
|
||||
- escapes[i].name, i, buf));
|
||||
+ escapes[e].name, i, buf));
|
||||
}
|
||||
buf[i] = '\0';
|
||||
|
||||
@@ -1452,7 +1454,8 @@ read_special_escape (InputStream *is, To
|
||||
switch (escapes[e].escape)
|
||||
{
|
||||
case ESC_FONT:
|
||||
- strcpy (token->u.font.name, buf);
|
||||
+ memset (token->u.font.name, 0, sizeof(token->u.font.name));
|
||||
+ strncpy (token->u.font.name, buf, sizeof(token->u.font.name) - 1);
|
||||
|
||||
/* Check for the default font. */
|
||||
if (strcmp (token->u.font.name, "default") == 0)
|
||||
@@ -1465,7 +1468,8 @@ read_special_escape (InputStream *is, To
|
||||
FATAL ((stderr, _("malformed font spec for ^@font escape: %s"),
|
||||
token->u.font.name));
|
||||
|
||||
- strcpy (token->u.font.name, cp);
|
||||
+ memset (token->u.font.name, 0, sizeof(token->u.font.name));
|
||||
+ strncpy (token->u.font.name, cp, sizeof(token->u.font.name) - 1);
|
||||
xfree (cp);
|
||||
}
|
||||
token->type = tFONT;
|
||||
@@ -1544,7 +1548,8 @@ read_special_escape (InputStream *is, To
|
||||
break;
|
||||
|
||||
case ESC_SETFILENAME:
|
||||
- strcpy (token->u.filename, buf);
|
||||
+ memset (token->u.filename, 0, sizeof(token->u.font.name));
|
||||
+ strncpy (token->u.filename, buf, sizeof(token->u.filename) - 1);
|
||||
token->type = tSETFILENAME;
|
||||
break;
|
@ -1,16 +0,0 @@
|
||||
--- afm/Makefile.in.orig 2003-03-05 10:40:06.000000000 +0300
|
||||
+++ afm/Makefile.in 2014-05-11 17:56:09.000000000 +0400
|
||||
@@ -319,10 +319,10 @@
|
||||
|
||||
|
||||
install-data-local:
|
||||
- $(top_srcdir)/mkinstalldirs $(datadir)/enscript
|
||||
- $(top_srcdir)/mkinstalldirs $(datadir)/enscript/afm
|
||||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/enscript
|
||||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/enscript/afm
|
||||
for f in $(EXTRA_DIST); do \
|
||||
- $(INSTALL_DATA) $(srcdir)/$$f $(datadir)/enscript/afm/$$f; \
|
||||
+ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(datadir)/enscript/afm/$$f; \
|
||||
done
|
||||
|
||||
uninstall-local:
|
@ -1,21 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -1793,7 +1793,6 @@
|
||||
|
||||
fi;
|
||||
|
||||
-if test "X$CC" = "X"; then
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@@ -2816,7 +2815,6 @@
|
||||
fi
|
||||
|
||||
|
||||
-fi
|
||||
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
--- states/hl/enscript.st.orig Wed Mar 5 02:31:31 2003
|
||||
+++ states/hl/enscript.st Tue Mar 2 06:09:12 2004
|
||||
@@ -489,6 +489,7 @@
|
||||
/\.idl$/ idl;
|
||||
/\.(hs|lhs|gs|lgs)$/ haskell;
|
||||
/\.(pm|pl)$/ perl;
|
||||
+ /\.(rb|rbw)$/ ruby;
|
||||
/\.(eps|EPS|ps|PS)$/ postscript;
|
||||
/\.py$/ python;
|
||||
/\.pyx$/ pyrex;
|
||||
@@ -530,6 +531,8 @@
|
||||
/-\*- [Ii][Dd][Ll] -\*-/ idl;
|
||||
/-\*- [Pp][Ee][Rr][Ll] -\*-/ perl;
|
||||
/^#![ \t]*\/.*\/perl/ perl;
|
||||
+ /-\*- [Rr][Uu][Bb][Yy] -\*-/ ruby;
|
||||
+ /^#![ \t]*\/.*\/(env )?ruby/ ruby;
|
||||
/^From:/ mail;
|
||||
/^#![ \t]*(\/usr)?\/bin\/[ngmt]?awk/ awk;
|
||||
/^#![ \t]*(\/usr)?\/bin\/sh/ sh;
|
@ -1,17 +0,0 @@
|
||||
--- lib/Makefile.in.orig 2003-03-05 10:40:07.000000000 +0300
|
||||
+++ lib/Makefile.in 2014-05-11 17:54:53.000000000 +0400
|
||||
@@ -345,12 +345,8 @@
|
||||
all-local: enscript.cfg
|
||||
|
||||
install-data-local: enscript.cfg
|
||||
- $(top_srcdir)/mkinstalldirs $(sysconfdir)
|
||||
- if test -r $(sysconfdir)/enscript.cfg; then \
|
||||
- cp $(sysconfdir)/enscript.cfg $(sysconfdir)/enscript.cfg.old; \
|
||||
- else :; \
|
||||
- fi
|
||||
- $(INSTALL_DATA) enscript.cfg $(sysconfdir)/enscript.cfg
|
||||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
|
||||
+ $(INSTALL_DATA) enscript.cfg $(DESTDIR)$(sysconfdir)/enscript.cfg
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(sysconfdir)/enscript.cfg
|
@ -1,208 +0,0 @@
|
||||
--- states/hl/ruby.st.orig Wed Dec 31 18:00:00 1969
|
||||
+++ states/hl/ruby.st Tue Mar 2 06:11:05 2004
|
||||
@@ -0,0 +1,205 @@
|
||||
+/**
|
||||
+ * Name: ruby
|
||||
+ * Description: Ruby programming language.
|
||||
+ * Author: Mike Wilson <m.v.wilson@home.com>
|
||||
+ */
|
||||
+
|
||||
+state ruby_comment
|
||||
+{
|
||||
+ /\*\\\// {
|
||||
+ language_print ($0);
|
||||
+ return;
|
||||
+ }
|
||||
+ LANGUAGE_SPECIALS {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+state ruby_dquot_string
|
||||
+{
|
||||
+ /\\\\./ {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+ /\"/ {
|
||||
+ language_print ($0);
|
||||
+ return;
|
||||
+ }
|
||||
+ LANGUAGE_SPECIALS {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+state ruby_quot_string
|
||||
+{
|
||||
+ /\\\\./ {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+ /[\']/ {
|
||||
+ language_print ($0);
|
||||
+ return;
|
||||
+ }
|
||||
+ LANGUAGE_SPECIALS {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+state ruby_bquot_string
|
||||
+{
|
||||
+ /\\\\./ {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+ /`/ {
|
||||
+ language_print ($0);
|
||||
+ return;
|
||||
+ }
|
||||
+ LANGUAGE_SPECIALS {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+state ruby
|
||||
+{
|
||||
+ BEGIN {
|
||||
+ header ();
|
||||
+ }
|
||||
+ END {
|
||||
+ trailer ();
|
||||
+ }
|
||||
+
|
||||
+ /* Comments. */
|
||||
+ /#[^{].*$/ {
|
||||
+ comment_face (true);
|
||||
+ language_print ($0);
|
||||
+ comment_face (false);
|
||||
+ }
|
||||
+
|
||||
+ /* Ignore escaped quote marks */
|
||||
+ /\\\"/ {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+ /\\\'/ {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+ /\\\`/ {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+
|
||||
+ /* In cgi files, JavaScript might be imbedded, so we need to look out
|
||||
+ * for the JavaScript comments, because they might contain something
|
||||
+ * we don't like, like a contraction (don't, won't, etc.)
|
||||
+ * We won't put them in comment face, because they are not ruby
|
||||
+ * comments.
|
||||
+ */
|
||||
+ /\/\// {
|
||||
+ language_print ($0);
|
||||
+ call (eat_one_line);
|
||||
+ }
|
||||
+
|
||||
+ /* String constants. */
|
||||
+ /\"/ {
|
||||
+ string_face (true);
|
||||
+ language_print ($0);
|
||||
+ call (ruby_dquot_string);
|
||||
+ string_face (false);
|
||||
+ }
|
||||
+ /[\']/ {
|
||||
+ string_face (true);
|
||||
+ language_print ($0);
|
||||
+ call (ruby_quot_string);
|
||||
+ string_face (false);
|
||||
+ }
|
||||
+
|
||||
+ /* Backquoted command string */
|
||||
+ /`/ {
|
||||
+ string_face (true);
|
||||
+ language_print ($0);
|
||||
+ call (ruby_bquot_string);
|
||||
+ string_face (false);
|
||||
+ }
|
||||
+
|
||||
+ /* Variables globals and instance */
|
||||
+ /[$@]\w+/ {
|
||||
+ variable_name_face (true);
|
||||
+ language_print ($0);
|
||||
+ variable_name_face (false);
|
||||
+ }
|
||||
+
|
||||
+ /* Variables class variable */
|
||||
+ /@@\w+/ {
|
||||
+ variable_name_face (true);
|
||||
+ language_print ($0);
|
||||
+ variable_name_face (false);
|
||||
+ }
|
||||
+
|
||||
+ /([ \t]*)(def)([ \t]+)([^(]*)/ {
|
||||
+ /* indentation */
|
||||
+ language_print ($1);
|
||||
+
|
||||
+ /* def */
|
||||
+ keyword_face (true);
|
||||
+ language_print ($2);
|
||||
+ keyword_face (false);
|
||||
+
|
||||
+ /* middle */
|
||||
+ language_print ($3);
|
||||
+
|
||||
+ /* Function name. */
|
||||
+ function_name_face (true);
|
||||
+ language_print ($4);
|
||||
+ function_name_face (false);
|
||||
+ }
|
||||
+
|
||||
+ /\$[!@&`'+~=\/\\,;.<>_*$?:"]/ {
|
||||
+ variable_name_face (true);
|
||||
+ language_print ($0);
|
||||
+ variable_name_face (false);
|
||||
+ }
|
||||
+
|
||||
+ /* Highlighting
|
||||
+ --Type face
|
||||
+ private protected public
|
||||
+
|
||||
+ --Builtin face (I consider these to be somewhat special)
|
||||
+ alias alias_method attr attr_accessor attr_reader attr_writer
|
||||
+ module_alias module_function self super
|
||||
+
|
||||
+ --Reference face
|
||||
+ require include
|
||||
+
|
||||
+ --Keyword face
|
||||
+ and begin break case class def defined? do else elsif end
|
||||
+ ensure eval extend false for if in method module next nil not
|
||||
+ or redo rescue retry return then true undef unless until when
|
||||
+ while yield
|
||||
+ */
|
||||
+/\\b(private|protected|public)\\b/ {
|
||||
+ type_face (true);
|
||||
+ language_print ($0);
|
||||
+ type_face (false);
|
||||
+ }
|
||||
+
|
||||
+/\\b(alias|alias_method|attr|attr_accessor|attr_reader|attr_writer\\
|
||||
+|module_alias|module_function|self|super)\\b/ {
|
||||
+ builtin_face (true);
|
||||
+ language_print ($0);
|
||||
+ builtin_face (false);
|
||||
+ }
|
||||
+
|
||||
+/\\b(include|require)\\b/ {
|
||||
+ reference_face (true);
|
||||
+ language_print ($0);
|
||||
+ reference_face (false);
|
||||
+ }
|
||||
+
|
||||
+/\\b(and|begin|break|case|class|def|defined?|do|else|elsif|end|ensure|eval\\
|
||||
+|extend|false|for|if|in|method|module|next|nil|not|or|raise|redo|rescue|retry\\
|
||||
+|return|then|true|undef|unless|until|when|while|yield)\\b/ {
|
||||
+ keyword_face (true);
|
||||
+ language_print ($0);
|
||||
+ keyword_face (false);
|
||||
+ }
|
||||
+
|
||||
+ LANGUAGE_SPECIALS {
|
||||
+ language_print ($0);
|
||||
+ }
|
||||
+}
|
@ -1,15 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/gsint.h.orig
|
||||
+++ src/gsint.h
|
||||
@@ -701,4 +701,9 @@
|
||||
*/
|
||||
void printer_close ___P ((void *context));
|
||||
|
||||
+/*
|
||||
+ * Escape filenames for shell usage
|
||||
+ */
|
||||
+char *shell_escape ___P ((const char *fn));
|
||||
+
|
||||
#endif /* not GSINT_H */
|
@ -1,48 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/main.c.orig
|
||||
+++ src/main.c
|
||||
@@ -1546,9 +1546,13 @@
|
||||
buffer_append (&cmd, intbuf);
|
||||
buffer_append (&cmd, " ");
|
||||
|
||||
- buffer_append (&cmd, "-Ddocument_title=\"");
|
||||
- buffer_append (&cmd, title);
|
||||
- buffer_append (&cmd, "\" ");
|
||||
+ buffer_append (&cmd, "-Ddocument_title=\'");
|
||||
+ if ((cp = shell_escape (title)) != NULL)
|
||||
+ {
|
||||
+ buffer_append (&cmd, cp);
|
||||
+ free (cp);
|
||||
+ }
|
||||
+ buffer_append (&cmd, "\' ");
|
||||
|
||||
buffer_append (&cmd, "-Dtoc=");
|
||||
buffer_append (&cmd, toc ? "1" : "0");
|
||||
@@ -1565,8 +1569,14 @@
|
||||
/* Append input files. */
|
||||
for (i = optind; i < argc; i++)
|
||||
{
|
||||
- buffer_append (&cmd, " ");
|
||||
- buffer_append (&cmd, argv[i]);
|
||||
+ char *cp;
|
||||
+ if ((cp = shell_escape (argv[i])) != NULL)
|
||||
+ {
|
||||
+ buffer_append (&cmd, " \'");
|
||||
+ buffer_append (&cmd, cp);
|
||||
+ buffer_append (&cmd, "\'");
|
||||
+ free (cp);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* And do the job. */
|
||||
@@ -1627,7 +1637,7 @@
|
||||
buffer_ptr (opts), buffer_len (opts));
|
||||
}
|
||||
|
||||
- buffer_append (&buffer, " \"%s\"");
|
||||
+ buffer_append (&buffer, " \'%s\'");
|
||||
|
||||
input_filter = buffer_copy (&buffer);
|
||||
input_filter_stdin = "-";
|
@ -1,37 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/psgen.c.orig
|
||||
+++ src/psgen.c
|
||||
@@ -2034,8 +2034,9 @@
|
||||
else
|
||||
{
|
||||
ftail++;
|
||||
- strncpy (buf, fname, ftail - fname);
|
||||
- buf[ftail - fname] = '\0';
|
||||
+ i = ftail - fname >= sizeof (buf)-1 ? sizeof (buf)-1 : ftail - fname;
|
||||
+ strncpy (buf, fname, i);
|
||||
+ buf[i] = '\0';
|
||||
}
|
||||
|
||||
if (nup > 1)
|
||||
@@ -2385,9 +2386,10 @@
|
||||
MESSAGE (2, (stderr, "^@epsf=\"%s\"\n", token->u.epsf.filename));
|
||||
|
||||
i = strlen (token->u.epsf.filename);
|
||||
+ /*
|
||||
if (i > 0 && token->u.epsf.filename[i - 1] == '|')
|
||||
{
|
||||
- /* Read EPS data from pipe. */
|
||||
+ / * Read EPS data from pipe. * /
|
||||
token->u.epsf.pipe = 1;
|
||||
token->u.epsf.filename[i - 1] = '\0';
|
||||
token->u.epsf.fp = popen (token->u.epsf.filename, "r");
|
||||
@@ -2400,6 +2402,7 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
+ */
|
||||
{
|
||||
char *filename;
|
||||
|
@ -1,82 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/util.c.orig
|
||||
+++ src/util.c
|
||||
@@ -1239,6 +1239,8 @@
|
||||
|
||||
/* Create result. */
|
||||
cp = xmalloc (len + 1);
|
||||
+ if (cp == NULL)
|
||||
+ return NULL;
|
||||
for (i = 0, j = 0; string[i]; i++)
|
||||
switch (string[i])
|
||||
{
|
||||
@@ -1879,6 +1881,7 @@
|
||||
char *cmd = NULL;
|
||||
int cmdlen;
|
||||
int i, pos;
|
||||
+ char *cp;
|
||||
|
||||
is->is_pipe = 1;
|
||||
|
||||
@@ -1902,12 +1905,16 @@
|
||||
{
|
||||
case 's':
|
||||
/* Expand cmd-buffer. */
|
||||
- cmdlen += strlen (fname);
|
||||
- cmd = xrealloc (cmd, cmdlen);
|
||||
+ if ((cp = shell_escape (fname)) != NULL)
|
||||
+ {
|
||||
+ cmdlen += strlen (cp);
|
||||
+ cmd = xrealloc (cmd, cmdlen);
|
||||
|
||||
- /* Paste filename. */
|
||||
- strcpy (cmd + pos, fname);
|
||||
- pos += strlen (fname);
|
||||
+ /* Paste filename. */
|
||||
+ strcpy (cmd + pos, cp);
|
||||
+ pos += strlen (cp);
|
||||
+ free (cp);
|
||||
+ }
|
||||
|
||||
i++;
|
||||
break;
|
||||
@@ -2115,4 +2122,37 @@
|
||||
buffer_len (Buffer *buffer)
|
||||
{
|
||||
return buffer->len;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Escapes the name of a file so that the shell groks it in 'single'
|
||||
+ * quotation marks. The resulting pointer has to be free()ed when not
|
||||
+ * longer used.
|
||||
+*/
|
||||
+char *
|
||||
+shell_escape(const char *fn)
|
||||
+{
|
||||
+ size_t len = 0;
|
||||
+ const char *inp;
|
||||
+ char *retval, *outp;
|
||||
+
|
||||
+ for(inp = fn; *inp; ++inp)
|
||||
+ switch(*inp)
|
||||
+ {
|
||||
+ case '\'': len += 4; break;
|
||||
+ default: len += 1; break;
|
||||
+ }
|
||||
+
|
||||
+ outp = retval = malloc(len + 1);
|
||||
+ if(!outp)
|
||||
+ return NULL; /* perhaps one should do better error handling here */
|
||||
+ for(inp = fn; *inp; ++inp)
|
||||
+ switch(*inp)
|
||||
+ {
|
||||
+ case '\'': *outp++ = '\''; *outp++ = '\\'; *outp++ = '\'', *outp++ = '\''; break;
|
||||
+ default: *outp++ = *inp; break;
|
||||
+ }
|
||||
+ *outp = 0;
|
||||
+
|
||||
+ return retval;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
--- states/hl/Makefile.in.orig 2003-03-05 10:40:07.000000000 +0300
|
||||
+++ states/hl/Makefile.in 2014-05-11 17:58:23.000000000 +0400
|
||||
@@ -186,9 +186,9 @@
|
||||
diffs.st diffu.st elisp.st fortran.st fortran_pp.st haskell.st html.st \
|
||||
idl.st inf.st java.st javascript.st ksh.st m4.st mail.st makefile.st \
|
||||
matlab.st nroff.st objc.st outline.st pascal.st passthrough.st perl.st \
|
||||
-postscript.st python.st pyrex.st rfc.st scheme.st sh.st skill.st \
|
||||
-sql.st states.st synopsys.st tcl.st tcsh.st tex.st vba.st verilog.st \
|
||||
-vhdl.st vrml.st wmlscript.st zsh.st
|
||||
+postscript.st python.st pyrex.st rfc.st ruby.st scheme.st sh.st \
|
||||
+skill.st sql.st states.st synopsys.st tcl.st tcsh.st tex.st vba.st \
|
||||
+verilog.st vhdl.st vrml.st wmlscript.st zsh.st
|
||||
|
||||
|
||||
states = $(misc) $(styles) $(languages) $(highlightings)
|
||||
@@ -330,10 +330,10 @@
|
||||
|
||||
|
||||
install-data-local:
|
||||
- $(top_srcdir)/mkinstalldirs $(datadir)/enscript
|
||||
- $(top_srcdir)/mkinstalldirs $(datadir)/enscript/hl
|
||||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/enscript
|
||||
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/enscript/hl
|
||||
for f in $(states); do \
|
||||
- $(INSTALL_DATA) $(srcdir)/$$f $(datadir)/enscript/hl/$$f; \
|
||||
+ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(datadir)/enscript/hl/$$f; \
|
||||
done
|
||||
|
||||
uninstall-local:
|
@ -4,4 +4,4 @@ Input files in a number of programming languages, including C, Perl,
|
||||
Tcl, and more, can optionally be pretty-printed instead of printed as
|
||||
plain-text. Many printing options are available.
|
||||
|
||||
WWW: http://www.codento.com/people/mtr/genscript/
|
||||
WWW: http://www.gnu.org/software/enscript/
|
||||
|
@ -18,6 +18,7 @@ man/man1/states.1.gz
|
||||
%%DATADIR%%/88597.enc
|
||||
%%DATADIR%%/88599.enc
|
||||
%%DATADIR%%/a2ps.hdr
|
||||
%%DATADIR%%/afm/MustRead.html
|
||||
%%DATADIR%%/afm/agd.afm
|
||||
%%DATADIR%%/afm/agdo.afm
|
||||
%%DATADIR%%/afm/agw.afm
|
||||
@ -88,6 +89,7 @@ man/man1/states.1.gz
|
||||
%%DATADIR%%/hl/diffu.st
|
||||
%%DATADIR%%/hl/elisp.st
|
||||
%%DATADIR%%/hl/enscript.st
|
||||
%%DATADIR%%/hl/f90.st
|
||||
%%DATADIR%%/hl/fortran.st
|
||||
%%DATADIR%%/hl/fortran_pp.st
|
||||
%%DATADIR%%/hl/haskell.st
|
||||
@ -117,7 +119,6 @@ man/man1/states.1.gz
|
||||
%%DATADIR%%/hl/pyrex.st
|
||||
%%DATADIR%%/hl/python.st
|
||||
%%DATADIR%%/hl/rfc.st
|
||||
%%DATADIR%%/hl/ruby.st
|
||||
%%DATADIR%%/hl/scheme.st
|
||||
%%DATADIR%%/hl/sh.st
|
||||
%%DATADIR%%/hl/skill.st
|
||||
|
Loading…
Reference in New Issue
Block a user