/[gcl]/gcl/o/character.d
ViewVC logotype

Diff of /gcl/o/character.d

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by wfs, Mon Dec 6 22:44:10 1999 UTC revision 1.2 by camm, Sat Jul 20 07:10:55 2002 UTC
# Line 33  Foundation, 675 Mass Ave, Cambridge, MA Line 33  Foundation, 675 Mass Ave, Cambridge, MA
33          if (char_font(c) != 0 || char_bits(c) != 0)          if (char_font(c) != 0 || char_bits(c) != 0)
34                  @(return Cnil)                  @(return Cnil)
35          i = char_code(c);          i = char_code(c);
36          if (' ' <= i && i < '\177' || i == '\n')          if ((' ' <= i && i < '\177') || i == '\n')
37                  @(return Ct)                  @(return Ct)
38          @(return Cnil)          @(return Cnil)
39  @)  @)
# Line 107  Foundation, 675 Mass Ave, Cambridge, MA Line 107  Foundation, 675 Mass Ave, Cambridge, MA
107          as a digit of radix r.          as a digit of radix r.
108          If r > 36 or i is not a digit, -1 is returned.          If r > 36 or i is not a digit, -1 is returned.
109  */  */
110    int
111  digitp(i, r)  digitp(i, r)
112  int i, r;  int i, r;
113  {  {
# Line 159  object x, y; Line 160  object x, y;
160  @(defun char_eq (c &rest)  @(defun char_eq (c &rest)
161          int i;          int i;
162  @  @
163            check_type_character(&c);
164          for (i = 0;  i < narg;  i++)          for (i = 0;  i < narg;  i++)
165                  check_type_character(&vs_base[i]);                  check_type_character(&vs_base[i]);
166          for (i = 1;  i < narg;  i++)          for (i = 1;  i < narg;  i++)
# Line 170  object x, y; Line 172  object x, y;
172  @(defun char_neq (c &rest)  @(defun char_neq (c &rest)
173          int i, j;          int i, j;
174  @  @
175            check_type_character(&c);
176          for (i = 0;  i < narg;  i++)          for (i = 0;  i < narg;  i++)
177                  check_type_character(&vs_base[i]);                  check_type_character(&vs_base[i]);
178          if (narg == 0)          if (narg == 0)
# Line 201  object x, y; Line 204  object x, y;
204          return(0);          return(0);
205  }  }
206    
207    void
208  Lchar_cmp(s, t)  Lchar_cmp(s, t)
209  int s, t;  int s, t;
210  {  {
# Line 221  int s, t; Line 225  int s, t;
225          vs_base[0] = Ct;          vs_base[0] = Ct;
226  }  }
227    
228  Lchar_l()  { Lchar_cmp( 1, 1); }  void Lchar_l()  { Lchar_cmp( 1, 1); }
229  Lchar_g()  { Lchar_cmp(-1, 1); }  void Lchar_g()  { Lchar_cmp(-1, 1); }
230  Lchar_le() { Lchar_cmp( 1, 0); }  void Lchar_le() { Lchar_cmp( 1, 0); }
231  Lchar_ge() { Lchar_cmp(-1, 0); }  void Lchar_ge() { Lchar_cmp(-1, 0); }
232    
233    
234  bool  bool
# Line 245  object x, y; Line 249  object x, y;
249  @(defun char_equal (c &rest)  @(defun char_equal (c &rest)
250          int i;          int i;
251  @  @
252            check_type_character(&c);
253          for (i = 0;  i < narg;  i++)          for (i = 0;  i < narg;  i++)
254                  check_type_character(&vs_base[i]);                  check_type_character(&vs_base[i]);
255          for (i = 1;  i < narg;  i++)          for (i = 1;  i < narg;  i++)
# Line 256  object x, y; Line 261  object x, y;
261  @(defun char_not_equal (c &rest)  @(defun char_not_equal (c &rest)
262          int i, j;          int i, j;
263  @  @
264            check_type_character(&c);
265          for (i = 0;  i < narg;  i++)          for (i = 0;  i < narg;  i++)
266                  check_type_character(&vs_base[i]);                  check_type_character(&vs_base[i]);
267          for (i = 1;  i < narg;  i++)          for (i = 1;  i < narg;  i++)
# Line 286  object x, y; Line 292  object x, y;
292                  return(1);                  return(1);
293  }  }
294    
295    void
296  Lchar_compare(s, t)  Lchar_compare(s, t)
297  int s, t;  int s, t;
298  {  {
# Line 306  int s, t; Line 313  int s, t;
313          vs_base[0] = Ct;          vs_base[0] = Ct;
314  }  }
315    
316  Lchar_lessp()        { Lchar_compare( 1, 1); }  void Lchar_lessp()        { Lchar_compare( 1, 1); }
317  Lchar_greaterp()     { Lchar_compare(-1, 1); }  void Lchar_greaterp()     { Lchar_compare(-1, 1); }
318  Lchar_not_greaterp() { Lchar_compare( 1, 0); }  void Lchar_not_greaterp() { Lchar_compare( 1, 0); }
319  Lchar_not_lessp()    { Lchar_compare(-1, 0); }  void Lchar_not_lessp()    { Lchar_compare(-1, 0); }
320    
321    
322  object  object
# Line 331  BEGIN: Line 338  BEGIN:
338                  if (x->st.st_fillp == 1)                  if (x->st.st_fillp == 1)
339                          return(code_char(x->ust.ust_self[0]));                          return(code_char(x->ust.ust_self[0]));
340                  break;                  break;
341            default:
342                    break;
343          }          }
344          vs_push(x);          vs_push(x);
345          x = wrong_type_argument(sLcharacter, x);          x = wrong_type_argument(sLcharacter, x);
346          vs_pop;          vs_popp;
347          goto BEGIN;          goto BEGIN;
348  }  }
349    
# Line 566  int w, r; Line 575  int w, r;
575          FEerror("Cannot set char-bit of ~S.", 1, c);          FEerror("Cannot set char-bit of ~S.", 1, c);
576  @)  @)
577    
578    void
579  init_character()  init_character()
580  {  {
         object ch;  
581          int i;          int i;
582    
583          for (i = 0;  i < CHCODELIM;  i++) {          for (i = 0;  i < CHCODELIM;  i++) {
# Line 614  init_character() Line 623  init_character()
623          make_constant("CHAR-HYPER-BIT", make_fixnum(0));          make_constant("CHAR-HYPER-BIT", make_fixnum(0));
624  }  }
625    
626    void
627  init_character_function()  init_character_function()
628  {  {
629          make_function("STANDARD-CHAR-P", Lstandard_char_p);          make_function("STANDARD-CHAR-P", Lstandard_char_p);

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26