aboutsummaryrefslogtreecommitdiffstats
path: root/src/category.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/category.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz
emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C. * src/atimer.c: * src/bidi.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/ccl.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/doprnt.c: * src/ecrt0.c: * src/editfns.c: * src/fileio.c: * src/filelock.c: * src/filemode.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/ftfont.c: * src/ftxfont.c: * src/gtkutil.c: * src/indent.c: * src/insdel.c: * src/intervals.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/md5.c: * src/menu.c: * src/minibuf.c: * src/prefix-args.c: * src/print.c: * src/ralloc.c: * src/regex.c: * src/region-cache.c: * src/scroll.c: * src/search.c: * src/sound.c: * src/strftime.c: * src/syntax.c: * src/sysdep.c: * src/termcap.c: * src/terminal.c: * src/terminfo.c: * src/textprop.c: * src/tparam.c: * src/undo.c: * src/unexelf.c: * src/window.c: * src/xfaces.c: * src/xfns.c: * src/xfont.c: * src/xftfont.c: * src/xgselect.c: * src/xmenu.c: * src/xrdb.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: * src/xterm.c: Likewise.
Diffstat (limited to 'src/category.c')
-rw-r--r--src/category.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/category.c b/src/category.c
index 610df686dab..ead142da008 100644
--- a/src/category.c
+++ b/src/category.c
@@ -62,8 +62,7 @@ Lisp_Object _temp_category_set;
62static Lisp_Object hash_get_category_set (Lisp_Object, Lisp_Object); 62static Lisp_Object hash_get_category_set (Lisp_Object, Lisp_Object);
63 63
64static Lisp_Object 64static Lisp_Object
65hash_get_category_set (table, category_set) 65hash_get_category_set (Lisp_Object table, Lisp_Object category_set)
66 Lisp_Object table, category_set;
67{ 66{
68 Lisp_Object val; 67 Lisp_Object val;
69 struct Lisp_Hash_Table *h; 68 struct Lisp_Hash_Table *h;
@@ -117,7 +116,7 @@ those categories. */)
117 116
118/* Category staff. */ 117/* Category staff. */
119 118
120Lisp_Object check_category_table (); 119Lisp_Object check_category_table (Lisp_Object table);
121 120
122DEFUN ("define-category", Fdefine_category, Sdefine_category, 2, 3, 0, 121DEFUN ("define-category", Fdefine_category, Sdefine_category, 2, 3, 0,
123 doc: /* Define CATEGORY as a category which is described by DOCSTRING. 122 doc: /* Define CATEGORY as a category which is described by DOCSTRING.
@@ -196,8 +195,7 @@ DEFUN ("category-table-p", Fcategory_table_p, Scategory_table_p, 1, 1, 0,
196 wrong-type-argument. */ 195 wrong-type-argument. */
197 196
198Lisp_Object 197Lisp_Object
199check_category_table (table) 198check_category_table (Lisp_Object table)
200 Lisp_Object table;
201{ 199{
202 if (NILP (table)) 200 if (NILP (table))
203 return current_buffer->category_table; 201 return current_buffer->category_table;
@@ -224,8 +222,7 @@ This is the one used for new buffers. */)
224 222
225 223
226static void 224static void
227copy_category_entry (table, c, val) 225copy_category_entry (Lisp_Object table, Lisp_Object c, Lisp_Object val)
228 Lisp_Object table, c, val;
229{ 226{
230 val = Fcopy_sequence (val); 227 val = Fcopy_sequence (val);
231 if (CONSP (c)) 228 if (CONSP (c))
@@ -240,8 +237,7 @@ copy_category_entry (table, c, val)
240 binding TABLE to a sub char table. */ 237 binding TABLE to a sub char table. */
241 238
242Lisp_Object 239Lisp_Object
243copy_category_table (table) 240copy_category_table (Lisp_Object table)
244 Lisp_Object table;
245{ 241{
246 table = copy_char_table (table); 242 table = copy_char_table (table);
247 243
@@ -304,8 +300,7 @@ Return TABLE. */)
304 300
305 301
306Lisp_Object 302Lisp_Object
307char_category_set (c) 303char_category_set (int c)
308 int c;
309{ 304{
310 return CHAR_TABLE_REF (current_buffer->category_table, c); 305 return CHAR_TABLE_REF (current_buffer->category_table, c);
311} 306}
@@ -344,8 +339,7 @@ The return value is a string containing those same categories. */)
344} 339}
345 340
346void 341void
347set_category_set (category_set, category, val) 342set_category_set (Lisp_Object category_set, Lisp_Object category, Lisp_Object val)
348 Lisp_Object category_set, category, val;
349{ 343{
350 do { 344 do {
351 int idx = XINT (category) / 8; 345 int idx = XINT (category) / 8;
@@ -420,8 +414,7 @@ then delete CATEGORY from the category set instead of adding it. */)
420 directly. */ 414 directly. */
421 415
422int 416int
423word_boundary_p (c1, c2) 417word_boundary_p (int c1, int c2)
424 int c1, c2;
425{ 418{
426 Lisp_Object category_set1, category_set2; 419 Lisp_Object category_set1, category_set2;
427 Lisp_Object tail; 420 Lisp_Object tail;
@@ -466,7 +459,7 @@ word_boundary_p (c1, c2)
466 459
467 460
468void 461void
469init_category_once () 462init_category_once (void)
470{ 463{
471 /* This has to be done here, before we call Fmake_char_table. */ 464 /* This has to be done here, before we call Fmake_char_table. */
472 Qcategory_table = intern_c_string ("category-table"); 465 Qcategory_table = intern_c_string ("category-table");
@@ -489,7 +482,7 @@ init_category_once ()
489} 482}
490 483
491void 484void
492syms_of_category () 485syms_of_category (void)
493{ 486{
494 Qcategoryp = intern_c_string ("categoryp"); 487 Qcategoryp = intern_c_string ("categoryp");
495 staticpro (&Qcategoryp); 488 staticpro (&Qcategoryp);