From 7e09cc870bb3a9e7d46ecd863224fd0a0f30d08b Mon Sep 17 00:00:00 2001 From: Steffen Nurpmeso Date: Thu, 2 Oct 2014 20:58:31 +0200 Subject: [PATCH] Adapt src/ute-pfbtops (src/utils/pfbtops) --- .../pfbtops/pfbtops.man => man/ute-pfbtops.1.in | 24 ++++---- src/ute-pfbtops/pfbtops-config.h | 10 +++ src/{utils/pfbtops => ute-pfbtops}/pfbtops.c | 72 ++++++++++------------ 3 files changed, 57 insertions(+), 49 deletions(-) rename src/utils/pfbtops/pfbtops.man => man/ute-pfbtops.1.in (72%) create mode 100644 src/ute-pfbtops/pfbtops-config.h rename src/{utils/pfbtops => ute-pfbtops}/pfbtops.c (72%) diff --git a/src/utils/pfbtops/pfbtops.man b/man/ute-pfbtops.1.in similarity index 72% rename from src/utils/pfbtops/pfbtops.man rename to man/ute-pfbtops.1.in index c97a2976..a8346bda 100644 --- a/src/utils/pfbtops/pfbtops.man +++ b/man/ute-pfbtops.1.in @@ -1,5 +1,9 @@ .ig -Copyright (C) 1989-1995, 2001, 2003, 2004 Free Software Foundation, Inc. +@ @L_PFBTOPS@.1 + +Copyright (c) 2014 Steffen (Daode) Nurpmeso . + +Copyright (C) 1989 - 1995, 2001, 2003, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,15 +22,15 @@ the original English. .. . . -.TH PFBTOPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.TH @U_PFBTOPS@ @MAN1EXT@ "@MDATE@" "@T_ROFF@ v@VERSION@" . . .SH NAME -pfbtops \- translate a PostScript font in .pfb format to ASCII +@L_PFBTOPS@ \- translate a PostScript font in .pfb format to ASCII . . .SH SYNOPSIS -.B pfbtops +.B @L_PFBTOPS@ [ .B \-v ] @@ -36,7 +40,7 @@ pfbtops \- translate a PostScript font in .pfb format to ASCII . . .SH DESCRIPTION -.B pfbtops +.B @L_PFBTOPS@ translates a PostScript font in .B .pfb format to ASCII, splitting overlong lines in text packets into smaller @@ -50,9 +54,9 @@ PostScript fonts for MS-DOS are normally supplied in format. . .LP -The resulting ASCII format PostScript font can be used with groff. +The resulting ASCII format PostScript font can be used with @L_ROFF@. It must first be listed in -.BR @FONTDIR@/devps/download . +.BR @FONTDIR@/dev-ps/download . . .SH OPTIONS .TP @@ -61,8 +65,6 @@ Print the version number. . . .SH "SEE ALSO" -.BR grops (@MAN1EXT@) +.BR @L_D_PS@ (@MAN1EXT@) . -.\" Local Variables: -.\" mode: nroff -.\" End: +.\" s-ts-mode diff --git a/src/ute-pfbtops/pfbtops-config.h b/src/ute-pfbtops/pfbtops-config.h new file mode 100644 index 00000000..71763948 --- /dev/null +++ b/src/ute-pfbtops/pfbtops-config.h @@ -0,0 +1,10 @@ +/*@ Configurable stuff */ +#ifndef _PFBTOPS_CONFIG_H +#define _PFBTOPS_CONFIG_H + +// Binary bytes per output line. +#define BYTES_PER_LINE (64/2) +#define MAX_LINE_LENGTH 78 + +#endif // _PFBTOPS_CONFIG_H +// s-it2-mode diff --git a/src/utils/pfbtops/pfbtops.c b/src/ute-pfbtops/pfbtops.c similarity index 72% rename from src/utils/pfbtops/pfbtops.c rename to src/ute-pfbtops/pfbtops.c index 6d6ab8d6..40891b64 100644 --- a/src/utils/pfbtops/pfbtops.c +++ b/src/ute-pfbtops/pfbtops.c @@ -1,44 +1,38 @@ -/* Copyright (C) 1992, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. - Written by James Clark (jjc@jclark.com) - -This file is part of groff. - -groff is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2, or (at your option) any later -version. - -groff is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License along -with groff; see the file COPYING. If not, write to the Free Software -Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This translates ps fonts in .pfb format to ASCII ps files. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#define __GETOPT_PREFIX groff_ +/*@ This translates ps fonts in .pfb format to ASCII ps files. + * + * Copyright (c) 2014 Steffen (Daode) Nurpmeso . + * + * Copyright (C) 1992, 2001, 2003 - 2005 Free Software Foundation, Inc. + * Written by James Clark (jjc@jclark.com) + * + * groff is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2, or (at your option) any later + * version. + * + * groff is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with groff; see the file COPYING. If not, write to the Free Software + * Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "config.h" +#include "pfbtops-config.h" + +#define __GETOPT_PREFIX groff_ /* FIXME */ +#include #include #include -#include - -#include +#include /* FIXME */ #include "nonposix.h" -/* Binary bytes per output line. */ -#define BYTES_PER_LINE (64/2) -#define MAX_LINE_LENGTH 78 -#define HEX_DIGITS "0123456789abcdef" - -extern const char *Version_string; +#define HEX_DIGITS "0123456789abcdef" static char *program_name; @@ -50,7 +44,7 @@ static void error(const char *s) static void usage(FILE *stream) { - fprintf(stream, "usage: %s [-v] [pfb_file]\n", program_name); + fprintf(stream, "Synopsis: %s [-v] [pfb_file]\n", program_name); } static void get_text(int n) @@ -129,7 +123,7 @@ static void get_text(int n) while (c != ' ' && c != '\t' && c != '\f') { putchar(c); if (n-- == 0) - break; + break; c = getchar(); } count = 0; @@ -178,7 +172,7 @@ int main(int argc, char **argv) while ((opt = getopt_long(argc, argv, "v", long_options, NULL)) != EOF) { switch (opt) { case 'v': - printf("GNU pfbtops (groff) version %s\n", Version_string); + printf(L_PFBTOPS " (" T_ROFF ") v" VERSION); exit(0); break; case CHAR_MAX + 1: /* --help */ @@ -229,3 +223,5 @@ int main(int argc, char **argv) } exit(0); } + +// s-it2-mode -- 2.11.4.GIT