Differences From Artifact [a7eb89018c]:
- File src/bag.c — part of check-in [52b35c8b40] at 2014-01-27 09:05:45 on branch trunk — Remove unnecessary end-of-line spaces. (My editor does that automatically, but I don't want it to happen together with other functional changes in a single commit). No change in code. (user: jan.nijtmans size: 5298) [more...]
To Artifact [d3660f2ddd]:
- File src/bag.c — part of check-in [4cf8dbe398] at 2019-12-23 02:08:07 on branch trunk — Merged in memleak-fixes brach. This fixes several genuine leaks, including 2 in manifest parsing, and cleans up the large work caches during atexit() in order to (A) separate that valgrind noise from the real leaks and (B) leave a better impression on those running valgrind. (user: stephan size: 5515) [more...]
| ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | + + + + + + |
*/
struct Bag {
int cnt; /* Number of integers in the bag */
int sz; /* Number of slots in a[] */
int used; /* Number of used slots in a[] */
int *a; /* Hash table of integers that are in the bag */
};
/*
** An expression for statically initializing a Bag instance, to be
** assigned to Bag instances at their declaration point. It has
** the same effect as passing the Bag to bag_init().
*/
#define Bag_INIT {0,0,0,0}
#endif
/*
** Initialize a Bag structure
*/
void bag_init(Bag *p){
memset(p, 0, sizeof(*p));
|
| ︙ |