summaryrefslogtreecommitdiff
path: root/charspace/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'charspace/symtab.c')
-rw-r--r--charspace/symtab.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/charspace/symtab.c b/charspace/symtab.c
index 9e45217..b7739fa 100644
--- a/charspace/symtab.c
+++ b/charspace/symtab.c
@@ -1,26 +1,28 @@
-/* symtab.c: create and update a symbol table. We use a simple linear
- representation, since there will be a few hundred entries at
- the very most.
-
- The numbers which get stored in the symbol table should all be in
- pixels. That's what the rest of the program expects. (Unfortunately
- there's no way to check this at the time of definition.)
-
-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. */
+# symtab.c: create and update a symbol table.
+#
+# 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/>.
+#
+
+
+# We use a simple linear representation, since there will be a few hundred
+# entries at the very most.
+#
+# The numbers which get stored in the symbol table should all be in
+# pixels. That's what the rest of the program expects. (Unfortunately
+# there's no way to check this at the time of definition.)
#include "config.h"
@@ -55,7 +57,7 @@ static symbol_type *symbol_table = NULL;
static symbol_type *symtab_find (string);
static boolean resolve_string (symval_type *, real);
-
+
/* Routines to create symval nodes. */
symval_type
@@ -113,7 +115,7 @@ symtab_string_node (string s)
return sv;
}
-
+
/* Define the identifier KEY to be the value V. We do no checking on V,
we just plop it in. Overwrite any previous definition of KEY. If
KEY was not previously defined, we malloc a new symbol. */
@@ -137,7 +139,7 @@ symtab_define (string key, symval_type v)
/* Whether we just created it or not, put in the new value. */
SYM_VAL (s) = v;
}
-
+
/* Define a kern of K pixels between the characters named LEFT and
RIGHT. If no kern for that pair previously existed, we create it.
If the character LEFT was not previously in the symbol table, we add
@@ -171,7 +173,7 @@ symtab_define_kern (string left, string right, symval_type k)
symtab_define (left, sv);
}
-
+
/* Look up KEY in `symbol_table'. If found, return a pointer to the
corresponding symval, else NULL. */
@@ -223,7 +225,7 @@ symtab_find (string key)
return s;
}
-
+
/* Resolve (to a real) the symbol value SV. Change SV if we succeed.
Return success. */
@@ -281,7 +283,7 @@ resolve_string (symval_type *sv, real factor)
return ok;
}
-
+
/* Return a description of SV as a string. */
string