comparison src/alloca.c @ 2965:0612d54a372a

[xemacs-hg @ 2005-09-30 02:15:06 by ben] fix --disable-debug error alloca.c: Don't declare a variable `register' when it can be passed to xfree(), which may take its address. new -> new_.
author ben
date Fri, 30 Sep 2005 02:15:08 +0000
parents 3d8143fc88e1
children 16112448d484
comparison
equal deleted inserted replaced
2964:bcbe7794aa6f 2965:0612d54a372a
141 141
142 /* Reclaim garbage, defined as all alloca'd storage that 142 /* Reclaim garbage, defined as all alloca'd storage that
143 was allocated from deeper in the stack than currently. */ 143 was allocated from deeper in the stack than currently. */
144 144
145 { 145 {
146 register header *hp; /* Traverses linked list. */ 146 header *hp; /* Traverses linked list. */
147 147
148 for (hp = last_alloca_header; hp != NULL;) 148 for (hp = last_alloca_header; hp != NULL;)
149 if ((STACK_DIR > 0 && hp->h.deep > depth) 149 if ((STACK_DIR > 0 && hp->h.deep > depth)
150 || (STACK_DIR < 0 && hp->h.deep < depth)) 150 || (STACK_DIR < 0 && hp->h.deep < depth))
151 { 151 {
175 175
176 /* Allocate combined header + user data storage. */ 176 /* Allocate combined header + user data storage. */
177 177
178 { 178 {
179 #ifdef emacs 179 #ifdef emacs
180 register pointer new = xmalloc (sizeof (header) + size); 180 register pointer new_ = xmalloc (sizeof (header) + size);
181 #else 181 #else
182 register pointer new = malloc (sizeof (header) + size); 182 register pointer new_ = malloc (sizeof (header) + size);
183 #endif 183 #endif
184 /* Address of header. */ 184 /* Address of header. */
185 185
186 ((header *) new)->h.next = last_alloca_header; 186 ((header *) new_)->h.next = last_alloca_header;
187 ((header *) new)->h.deep = depth; 187 ((header *) new_)->h.deep = depth;
188 188
189 last_alloca_header = (header *) new; 189 last_alloca_header = (header *) new_;
190 190
191 /* User storage begins just after header. */ 191 /* User storage begins just after header. */
192 192
193 return (pointer) ((char *) new + sizeof (header)); 193 return (pointer) ((char *) new_ + sizeof (header));
194 } 194 }
195 } 195 }
196 196
197 #if defined (CRAY) && defined (CRAY_STACKSEG_END) 197 #if defined (CRAY) && defined (CRAY_STACKSEG_END)
198 198