ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/vector.h
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/vector.h (file contents):
Revision 1.5 by ats, Mon Apr 5 00:58:05 2004 UTC vs.
Revision 1.7 by tdb, Tue Apr 6 14:54:48 2004 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream libstatgrab
3 + * http://www.i-scream.org
4 + * Copyright (C) 2000-2004 i-scream
5 + *
6 + * This library is free software; you can redistribute it and/or
7 + * modify it under the terms of the GNU Lesser General Public
8 + * License as published by the Free Software Foundation; either
9 + * version 2.1 of the License, or (at your option) any later version.
10 + *
11 + * This library is distributed in the hope that it will be useful,
12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 + * Lesser General Public License for more details.
15 + *
16 + * You should have received a copy of the GNU Lesser General Public
17 + * License along with this library; if not, write to the Free Software
18 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 + * 02111-1307 USA
20 + *
21 + * $Id$
22 + */
23 +
24   #include <stdlib.h>
25  
26   typedef void (*vector_init_function)(void *item);
# Line 25 | Line 48 | typedef struct {
48          }
49  
50   /* Internal function to resize the vector. */
51 < void *statgrab_vector_resize(void *vector, vector_header *h, int count);
51 > void *sg_vector_resize(void *vector, vector_header *h, int count);
52  
53   /* Declare a vector. Specify the init/destroy functions as NULL if you don't
54   * need them. The block size is how many items to allocate at once. */
# Line 46 | Line 69 | void *statgrab_vector_resize(void *vector, vector_head
69   * out-of-memory, the old contents of the vector will be destroyed and the old
70   * vector will be freed. */
71   #define VECTOR_RESIZE(name, num_items) \
72 <        (name = statgrab_vector_resize((char *) name, &name##_header, num_items), \
72 >        (name = sg_vector_resize((char *) name, &name##_header, num_items), \
73           name##_header.error)
74  
75   /* Free a vector, destroying its contents. */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines