/[gcl]/gcl/o/bind.c
ViewVC logotype

Diff of /gcl/o/bind.c

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

revision 1.10 by camm, Sun Sep 14 02:43:07 2003 UTC revision 1.11 by camm, Mon Sep 22 22:00:45 2003 UTC
# Line 228  KEYWORD: Line 228  KEYWORD:
228                  lambda_list = lambda_list->c.c_cdr;                  lambda_list = lambda_list->c.c_cdr;
229                  if (type_of(x) == t_cons) {                  if (type_of(x) == t_cons) {
230                          if (type_of(x->c.c_car) == t_cons) {                          if (type_of(x->c.c_car) == t_cons) {
231                                  if (!keywordp(x->c.c_car->c.c_car))                                  if (type_of(x->c.c_car->c.c_car)!=t_symbol)
232                                    /* FIXME better message */                                    /* FIXME better message */
233                                          FEunexpected_keyword(x->c.c_car->c.c_car);                                          FEunexpected_keyword(x->c.c_car->c.c_car);
234                                  vs_push(x->c.c_car->c.c_car);                                  vs_push(x->c.c_car->c.c_car);
# Line 437  SEARCH_DECLARE: Line 437  SEARCH_DECLARE:
437                  bind_var(rest->rest_var, vs_head, rest->rest_spp);                  bind_var(rest->rest_var, vs_head, rest->rest_spp);
438          }          }
439          if (key_flag) {          if (key_flag) {
440                    int allow_other_keys_found=0;
441                  i = narg - nreq - nopt;                  i = narg - nreq - nopt;
442                  if (i >= 0 && i%2 != 0)                  if (i >= 0 && i%2 != 0)
443                    /* FIXME better message */                    /* FIXME better message */
444                    FEunexpected_keyword(Cnil);                    FEunexpected_keyword(Cnil);
445                  other_keys_appeared = FALSE;                  other_keys_appeared = FALSE;
446                  for (i = nreq + nopt;  i < narg;  i += 2) {                  for (i = nreq + nopt;  i < narg;  i += 2) {
447                          if (!keywordp(base[i]))                          if (type_of(base[i])!=t_symbol)
448                                  FEunexpected_keyword(base[i]);                                  FEunexpected_keyword(base[i]);
449                          if (base[i] == sKallow_other_keys &&                          if (base[i] == sKallow_other_keys && !allow_other_keys_found) {
450                              base[i+1] != Cnil)                              allow_other_keys_found=1;
451                                if (base[i+1] != Cnil)
452                                  allow_other_keys_flag = TRUE;                                  allow_other_keys_flag = TRUE;
453                            }
454                          for (j = 0;  j < nkey;  j++) {                          for (j = 0;  j < nkey;  j++) {
455                                  if (keyword[j].key_word == base[i]) {                                  if (keyword[j].key_word == base[i]) {
456                                          if (keyword[j].key_svar_val                                          if (keyword[j].key_svar_val
# Line 460  SEARCH_DECLARE: Line 463  SEARCH_DECLARE:
463                                          goto NEXT_ARG;                                          goto NEXT_ARG;
464                                  }                                  }
465                          }                          }
466                          other_keys_appeared = TRUE;                          if (base[i] != sKallow_other_keys)
467                              other_keys_appeared = TRUE;
468    
469                  NEXT_ARG:                  NEXT_ARG:
470                          continue;                          continue;
# Line 735  parse_key(object *base, bool rest, bool Line 739  parse_key(object *base, bool rest, bool
739            FEunexpected_keyword(Cnil);            FEunexpected_keyword(Cnil);
740          if (narg == 2) {          if (narg == 2) {
741                  k = base[0];                  k = base[0];
742                  if (!keywordp(k))                  if (type_of(k)!=t_symbol)
743                    FEunexpected_keyword(k);                    FEunexpected_keyword(k);
744                  if (k == sKallow_other_keys && ! allow_other_keys_found) {                  if (k == sKallow_other_keys && ! allow_other_keys_found) {
745                    allow_other_keys_found=1;                    allow_other_keys_found=1;
# Line 777  parse_key(object *base, bool rest, bool Line 781  parse_key(object *base, bool rest, bool
781          va_end(ap);          va_end(ap);
782          for (v = base;  v < vs_top;  v += 2) {          for (v = base;  v < vs_top;  v += 2) {
783                  k = v[0];                  k = v[0];
784                  if (!keywordp(k)) {                  if (type_of(k)!=t_symbol) {
785                          error_flag = NOT_KEYWORD;                          error_flag = NOT_KEYWORD;
786                          other_key = k;                          other_key = k;
787                          continue;                          continue;
# Line 827  check_other_key(object l, int n, ...) Line 831  check_other_key(object l, int n, ...)
831          object k;          object k;
832          int i;          int i;
833          bool allow_other_keys = FALSE;          bool allow_other_keys = FALSE;
834            int allow_other_keys_found=0;
835    
836          for (;  !endp(l);  l = l->c.c_cdr->c.c_cdr) {          for (;  !endp(l);  l = l->c.c_cdr->c.c_cdr) {
837                  k = l->c.c_car;                  k = l->c.c_car;
838                  if (!keywordp(k))                  if (type_of(k)!=t_symbol)
839                    FEunexpected_keyword(k);                    FEunexpected_keyword(k);
840                  if (endp(l->c.c_cdr))                  if (endp(l->c.c_cdr))
841                    /* FIXME better message */                    /* FIXME better message */
842                    FEunexpected_keyword(Cnil);                    FEunexpected_keyword(Cnil);
843                  if (k == sKallow_other_keys && l->c.c_cdr->c.c_car != Cnil) {                  if (k == sKallow_other_keys && !allow_other_keys_found) {
844                          allow_other_keys = TRUE;                    allow_other_keys_found=1;
845                      if (l->c.c_cdr->c.c_car != Cnil)
846                        allow_other_keys = TRUE;
847                  } else {                  } else {
848                    char buf [100];                    char buf [100];
849                    bzero(buf,n);                    bzero(buf,n);

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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