X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgroff-font.c;h=9427089d3009f330e1e5997a6c59aab56583862e;hb=bd68eeaf9bf3dba6052943d41a907bc3c3dd3b9b;hp=15135aa1a3bdee060d5a2b73e33aa72a93be408c;hpb=f2828f801736701c0294803b5dedd4c4ab63b45e;p=pspp diff --git a/src/groff-font.c b/src/groff-font.c index 15135aa1a3..9427089d30 100644 --- a/src/groff-font.c +++ b/src/groff-font.c @@ -14,12 +14,12 @@ 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., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include #include "font.h" -#include +#include "error.h" #include #include #include @@ -48,13 +48,7 @@ static void add_kern (struct font_desc * font, int ch1, int ch2, int adjust); /* Typical whitespace characters for tokenizing. */ static const char whitespace[] = " \t\n\r\v"; -void -groff_init (void) -{ - space_index = font_char_name_to_index ("space"); -} - -/* Some notes on the groff_font(8) manpage: +/* Some notes on the groff_font manpage: DESC file format: A typical PostScript `res' would be 72000, with `hor' and `vert' set to 1 to indicate that all those positions are @@ -68,7 +62,7 @@ groff_init (void) /* Reads a Groff font description file and converts it to a usable binary format in memory. Installs the binary format in the global - font table. See groff_font(8) for a description of the font + font table. See groff_font for a description of the font description format supported. Returns nonzero on success. */ struct font_desc * groff_read_font (const char *fn) @@ -447,6 +441,20 @@ static struct } hash; +void +groff_init (void) +{ + space_index = font_char_name_to_index ("space"); +} + +void +groff_done (void) +{ + free (hash.tab) ; + pool_destroy(hash.ar); +} + + /* Searches for NAME in the global character code table, returns the index if found; otherwise inserts NAME and returns the new index. */