summaryrefslogtreecommitdiff
path: root/pk
diff options
context:
space:
mode:
Diffstat (limited to 'pk')
-rw-r--r--pk/ChangeLog139
-rw-r--r--pk/GNUmakefile10
-rw-r--r--pk/pk_input.c60
-rw-r--r--pk/pk_opcodes.h35
4 files changed, 56 insertions, 188 deletions
diff --git a/pk/ChangeLog b/pk/ChangeLog
index 9ee8f4d..7a5c861 100644
--- a/pk/ChangeLog
+++ b/pk/ChangeLog
@@ -1,138 +1,3 @@
-Tue Oct 27 12:56:27 1992 Karl Berry (karl@cs.umb.edu)
+DEPRECATED - USE ROOT CHANGELOG
- * Version 0.6.
-
-Thu Sep 3 09:31:18 1992 Karl Berry (karl@hayley)
-
- * Version 0.5.
-
-Sat Jun 13 11:45:30 1992 Karl Berry (karl@hayley)
-
- * pk_input.c: change for new names of list fns.
-
-Sat Mar 28 07:49:27 1992 Karl Berry (karl at hayley)
-
- * Version 0.4.
-
- * Change copyright years to 1992 only.
-
-Sat Mar 7 14:07:52 1992 Karl Berry (karl at fosse)
-
- * pk_input.c: complete prototypes for static fns.
-
-Sat Mar 7 11:16:20 1992 Karl Berry (karl at hayley)
-
- * GNUmakefile (files, headers, sources): replace with `c_and_h', etc.
-
-Thu Jan 9 08:29:21 1992 Karl Berry (karl at hayley)
-
- * *.c: do not include global.h.
-
- * *.h: remove #pragma once.
-
-Wed Jan 8 15:05:33 1992 Karl Berry (karl at hayley)
-
- * update copyright messages.
-
- * change `allocate to `xmalloc', `reallocate' to `xrealloc', and
- `string_copy' to `strdup'.
-
-Tue Jul 30 13:19:47 1991 Karl Berry (karl at ra.cs.umb.edu)
-
- * Version 0.3.
-
-Sat Jun 15 09:53:33 1991 Karl Berry (karl at hayley)
-
- * all files: change `checked_' to `x'.
-
-Thu Jun 6 07:31:28 1991 Karl Berry (karl at hayley)
-
- * All files: change to version 2 of the GPL.
-
-Thu Mar 7 07:33:24 1991 Karl Berry (karl at hayley)
-
- * Version 0.2.
-
-Mon Mar 4 15:00:02 1991 Karl Berry (karl at hayley)
-
- * pk_input.c: doc fix.
-
-Mon Feb 25 16:04:52 1991 Karl Berry (karl at hayley)
-
- * pk_input.c: use `pk_...' instead of `..._pk_...'.
-
-Sun Feb 17 09:48:32 1991 Karl Berry (karl at hayley)
-
- * pk_input.c: include config.h.
-
-Sat Nov 17 12:52:59 1990 Karl Berry (karl at hayley)
-
- * pk_input.c: include appropriate file-...h files.
-
-Sat Sep 29 09:01:25 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (find_internal_font): return null at the end.
-
-Sun Sep 9 12:37:53 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (pk_get_string): append a trailing null to the
- string.
-
-Wed Aug 29 14:23:26 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (pk_get_byte, ...): add the filename argument, and
- rewrite as macros.
-
-Sat Aug 25 13:42:42 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (get_bitmap): ignore bits remaining in the last byte.
-
-Wed May 30 15:32:37 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (get_one_pk_char): give a better error message if the
- character code is out of range; allow for it to be negative.
-
-Wed May 2 12:14:57 1990 Karl Berry (karl at claude)
-
- * pk_input.c (delete_internal_font): new routine.
- (close_pk_input_file): call it, instead of doing the work here.
-
-Sun Apr 22 07:04:07 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (unpack): off by one in calculation of the minimum row.
-
-Tue Apr 17 07:17:33 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (pk_get_two): new routine.
- (get_one_pk_char): call it to get the packet length in the
- extended short format.
-
- * pk_input.c (unpack): get the h and v_offset values as signed
- numbers.
-
- * pk_input.c: make `do_upper_nybble' visible to the file, so that
- we can set it to true before reading each character.
-
-Mon Apr 16 16:53:36 1990 Karl Berry (karl at hayley)
-
- * pk_input.c (get_packed_bitmap): don't overwrite the repeat count
- for a row on a subsequent run count.
-
- * pk_input.c (get_run_count): forgot to initialize *repeat_count
- to zero, and to only look for it once.
-
- * pk_input.c (data_get_nybble): returned the upper nybble when we
- wanted the lower, and vice versa.
-
- * pk_input.c (get_one_pk_char): tested wrong bit to see which
- preamble format we were supposed to read.
-
- * pk_input.c (get_one_pk_char): allocate the space for each packed
- character before we fill it in.
-
- * pk_input.c (get_one_pk_char): the flag byte has already been
- read; get it as a parameter, not by reading it from the file.
-
- * pk_input.c (get_all_pk_chars): test for a non-command first,
- since that is so common. And give a fatal error if we hit a
- command that isn't undefined.
+For historical purposes you can view ChangeLog.old.
diff --git a/pk/GNUmakefile b/pk/GNUmakefile
index 8fd2519..c5e34b1 100644
--- a/pk/GNUmakefile
+++ b/pk/GNUmakefile
@@ -2,10 +2,10 @@
#
# Copyright (C) 1992, 2011 Free Software Foundation, Inc.
#
-# This program is free software; you can redistribute it and/or modify
+# This program 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 3, or (at your option)
-# any later version.
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,9 +13,9 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+
library = pk
c_only = pk_input
diff --git a/pk/pk_input.c b/pk/pk_input.c
index ab7e083..336834d 100644
--- a/pk/pk_input.c
+++ b/pk/pk_input.c
@@ -1,25 +1,27 @@
-/* pk_input.c: read from any number of PK files. The basic idea is to
- read the entire file into memory the first time the client asks for a
- character. Since PK files tend to be quite small, this does not use
- an enormous amount of memory. But we only bother to unpack a
- character's bitmap when the client asks for that particular
- character.
-
-Copyright (C) 1992, 2011 Free Software Foundation, Inc.
-
-This program 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 3, or (at your option)
-any later version.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+# pk_input.c: read from any number of PK files.
+#
+# Copyright (C) 1992, 2011 Free Software Foundation, Inc.
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# The basic idea is to
+# read the entire file into memory the first time the client asks for a
+# character. Since PK files tend to be quite small, this does not use
+# an enormous amount of memory. But we only bother to unpack a
+# character's bitmap when the client asks for that particular
+# character.
#include "config.h"
@@ -101,7 +103,7 @@ typedef struct
PACKED_DATA_LENGTH (*INTERNAL_PACKED_CHAR (f, c))
#define INTERNAL_PACKED_DATA(f, c) \
PACKED_DATA (*INTERNAL_PACKED_CHAR (f, c))
-
+
/* File I/O. */
static FILE *pk_input_file; /* The file we're currently reading. */
static string current_filename; /* Its pathname. */
@@ -143,7 +145,7 @@ static signed_4_bytes data_get_signed_n_byte_value (one_byte);
static internal_font_type *find_internal_font (string);
static void save_internal_font (string, FILE *);
static void delete_internal_font (string);
-
+
/* Prepare for reading FILENAME. Return false if it can't be opened.
We allow the same file to be opened twice; I'm not sure if that's a
good idea or not, but it doesn't seem to matter much. */
@@ -169,7 +171,7 @@ pk_close_input_file (string filename)
{
delete_internal_font (filename);
}
-
+
/* The PK preamble contains the fontwide information we are supposed to
return. If FONT_NAME isn't open for reading, we give a fatal error. */
@@ -201,7 +203,7 @@ pk_get_preamble (string filename)
return p;
}
-
+
/* Return the information for the character CODE in the font FILENAME,
or null if the character doesn't exist in that font. */
@@ -514,7 +516,7 @@ get_bitmap (pk_char_type *pk_char)
while (extra_bits-- > 0)
(void) data_get_bit ();
}
-
+
/* Low-level routines that read from the disk file. */
static string
@@ -543,7 +545,7 @@ pk_get_n_byte_value (unsigned n)
return v;
}
-
+
/* These routines do not read from a disk file. Instead, they read from
memory (where we have put each character's definition, directly from
the file.) They use the semi-global `pk_input_data'. */
@@ -637,7 +639,7 @@ data_get_signed_n_byte_value (one_byte passed_n)
return v;
}
-
+
/* We assign an index number to NAME, and store both NAME and the
`internal_font_type' that we construct in parallel lists. The file F
goes into the `internal_font_list'. */
diff --git a/pk/pk_opcodes.h b/pk/pk_opcodes.h
index 58baf45..6ead2b2 100644
--- a/pk/pk_opcodes.h
+++ b/pk/pk_opcodes.h
@@ -1,21 +1,22 @@
-/* pk_opcodes.h: symbolic names for some of the GF commands and special
- values.
+# pk_opcodes.h: symbolic names for some of the GF commands and special
+# values.
+#
+# Copyright (C) 1992, 2011 Free Software Foundation, Inc.
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+#
-Copyright (C) 1992, 2011 Free Software Foundation, Inc.
-
-This program 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 3, or (at your option)
-any later version.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef PK_OPCODES_H
#define PK_OPCODES_H