/[emacs]/emacs/oldXMenu/XCrAssoc.c
ViewVC logotype

Diff of /emacs/oldXMenu/XCrAssoc.c

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

revision 1.1 by fx, Sun Oct 3 19:35:17 1999 UTC revision 1.2 by lektu, Tue Feb 4 14:19:01 2003 UTC
# Line 37  XAssocTable *XCreateAssocTable(size) Line 37  XAssocTable *XCreateAssocTable(size)
37          register XAssocTable *table;    /* XAssocTable to be initialized. */          register XAssocTable *table;    /* XAssocTable to be initialized. */
38          register XAssoc *buckets;       /* Pointer to the first bucket in */          register XAssoc *buckets;       /* Pointer to the first bucket in */
39                                          /* the bucket array. */                                          /* the bucket array. */
40            
41          /* Malloc the XAssocTable. */          /* Malloc the XAssocTable. */
42          if ((table = (XAssocTable *)malloc(sizeof(XAssocTable))) == NULL) {          if ((table = (XAssocTable *)malloc(sizeof(XAssocTable))) == NULL) {
43                  /* malloc call failed! */                  /* malloc call failed! */
44                  errno = ENOMEM;                  errno = ENOMEM;
45                  return(NULL);                  return(NULL);
46          }          }
47            
48          /* calloc the buckets (actually just their headers). */          /* calloc the buckets (actually just their headers). */
49          buckets = (XAssoc *)calloc((unsigned)size, (unsigned)sizeof(XAssoc));          buckets = (XAssoc *)calloc((unsigned)size, (unsigned)sizeof(XAssoc));
50          if (buckets == NULL) {          if (buckets == NULL) {

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

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