comparison src/eldap.c @ 647:b39c14581166

[xemacs-hg @ 2001-08-13 04:45:47 by ben] removal of unsigned, size_t, etc.
author ben
date Mon, 13 Aug 2001 04:46:48 +0000
parents 190b164ddcac
children fdefd0186b75
comparison
equal deleted inserted replaced
646:00c54252fe4f 647:b39c14581166
599 LDAP *ld; 599 LDAP *ld;
600 LDAPMod *ldap_mods, **ldap_mods_ptrs; 600 LDAPMod *ldap_mods, **ldap_mods_ptrs;
601 struct berval *bervals; 601 struct berval *bervals;
602 int rc; 602 int rc;
603 int i, j; 603 int i, j;
604 size_t len; 604 Element_Count len;
605 605
606 Lisp_Object current = Qnil; 606 Lisp_Object current = Qnil;
607 Lisp_Object values = Qnil; 607 Lisp_Object values = Qnil;
608 struct gcpro gcpro1, gcpro2; 608 struct gcpro gcpro1, gcpro2;
609 609
620 CHECK_CONS (entry); 620 CHECK_CONS (entry);
621 if (NILP (entry)) 621 if (NILP (entry))
622 invalid_operation ("Cannot add void entry", entry); 622 invalid_operation ("Cannot add void entry", entry);
623 623
624 /* Build the ldap_mods array */ 624 /* Build the ldap_mods array */
625 len = XINT (Flength (entry)); 625 len = (Element_Count) XINT (Flength (entry));
626 ldap_mods = alloca_array (LDAPMod, len); 626 ldap_mods = alloca_array (LDAPMod, len);
627 ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len); 627 ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len);
628 i = 0; 628 i = 0;
629 EXTERNAL_LIST_LOOP (entry, entry) 629 EXTERNAL_LIST_LOOP (entry, entry)
630 { 630 {
635 LISP_STRING_TO_EXTERNAL (XCAR (current), ldap_mods[i].mod_type, Qnative); 635 LISP_STRING_TO_EXTERNAL (XCAR (current), ldap_mods[i].mod_type, Qnative);
636 ldap_mods[i].mod_op = LDAP_MOD_ADD | LDAP_MOD_BVALUES; 636 ldap_mods[i].mod_op = LDAP_MOD_ADD | LDAP_MOD_BVALUES;
637 values = XCDR (current); 637 values = XCDR (current);
638 if (CONSP (values)) 638 if (CONSP (values))
639 { 639 {
640 len = XINT (Flength (values)); 640 len = (Element_Count) XINT (Flength (values));
641 bervals = alloca_array (struct berval, len); 641 bervals = alloca_array (struct berval, len);
642 ldap_mods[i].mod_vals.modv_bvals = 642 ldap_mods[i].mod_vals.modv_bvals =
643 alloca_array (struct berval *, 1 + len); 643 alloca_array (struct berval *, 1 + len);
644 j = 0; 644 j = 0;
645 EXTERNAL_LIST_LOOP (values, values) 645 EXTERNAL_LIST_LOOP (values, values)
693 LDAP *ld; 693 LDAP *ld;
694 LDAPMod *ldap_mods, **ldap_mods_ptrs; 694 LDAPMod *ldap_mods, **ldap_mods_ptrs;
695 struct berval *bervals; 695 struct berval *bervals;
696 int i, j, rc; 696 int i, j, rc;
697 Lisp_Object mod_op; 697 Lisp_Object mod_op;
698 size_t len; 698 Element_Count len;
699 699
700 Lisp_Object current = Qnil; 700 Lisp_Object current = Qnil;
701 Lisp_Object values = Qnil; 701 Lisp_Object values = Qnil;
702 struct gcpro gcpro1, gcpro2; 702 struct gcpro gcpro1, gcpro2;
703 703
712 CHECK_CONS (mods); 712 CHECK_CONS (mods);
713 if (NILP (mods)) 713 if (NILP (mods))
714 return Qnil; 714 return Qnil;
715 715
716 /* Build the ldap_mods array */ 716 /* Build the ldap_mods array */
717 len = XINT (Flength (mods)); 717 len = (Element_Count) XINT (Flength (mods));
718 ldap_mods = alloca_array (LDAPMod, len); 718 ldap_mods = alloca_array (LDAPMod, len);
719 ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len); 719 ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len);
720 i = 0; 720 i = 0;
721 721
722 GCPRO2 (current, values); 722 GCPRO2 (current, values);
738 invalid_constant ("Invalid LDAP modification type", mod_op); 738 invalid_constant ("Invalid LDAP modification type", mod_op);
739 current = XCDR (current); 739 current = XCDR (current);
740 CHECK_STRING (XCAR (current)); 740 CHECK_STRING (XCAR (current));
741 LISP_STRING_TO_EXTERNAL (XCAR (current), ldap_mods[i].mod_type, Qnative); 741 LISP_STRING_TO_EXTERNAL (XCAR (current), ldap_mods[i].mod_type, Qnative);
742 values = XCDR (current); 742 values = XCDR (current);
743 len = XINT (Flength (values)); 743 len = (Element_Count) XINT (Flength (values));
744 bervals = alloca_array (struct berval, len); 744 bervals = alloca_array (struct berval, len);
745 ldap_mods[i].mod_vals.modv_bvals = 745 ldap_mods[i].mod_vals.modv_bvals =
746 alloca_array (struct berval *, 1 + len); 746 alloca_array (struct berval *, 1 + len);
747 j = 0; 747 j = 0;
748 EXTERNAL_LIST_LOOP (values, values) 748 EXTERNAL_LIST_LOOP (values, values)