ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/vector.c
Revision 1.9 - (view) (annotate) - [select for diffs]
Wed Apr 7 14:53:40 2004 UTC (20 years ago) by tdb
Branch: MAIN
CVS Tags: HEAD, LIBSTATGRAB_0_10, LIBSTATGRAB_0_10_1, LIBSTATGRAB_0_10_2, LIBSTATGRAB_0_10_3, LIBSTATGRAB_0_11, LIBSTATGRAB_0_11_1, LIBSTATGRAB_0_12, LIBSTATGRAB_0_13, LIBSTATGRAB_0_14, LIBSTATGRAB_0_15, LIBSTATGRAB_0_16, LIBSTATGRAB_0_17
Changes since 1.8: +3 -3 lines
Diff to previous 1.8
Whitespace tidyup - change spaces to tabs.

Revision 1.8 - (view) (annotate) - [select for diffs]
Wed Apr 7 14:36:36 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7
Include tools.h to get sg_realloc.

Revision 1.7 - (view) (annotate) - [select for diffs]
Wed Apr 7 10:33:50 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6
Change malloc -> sg_malloc, realloc -> sg_realloc, and rewrite the one
calloc call to use sg_malloc.

Revision 1.6 - (view) (annotate) - [select for diffs]
Tue Apr 6 14:52:58 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5
Update name of project at the top of all soure files. These files now exist
in their own right, rather than as part of the "CMS".

Revision 1.5 - (view) (annotate) - [select for diffs]
Mon Apr 5 15:40:15 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4
Rename all the functions, types and enums in the API to be consistent.
Types are now of the form "sg_mem_stats"; functions of the form
"sg_get_mem_stats"; enums of the form "SG_PROCESS_STATE_RUNNING".
(The old get_proc_snapshot follows the usual calling convention now.)

Make internal functions static where possible.

Rename non-static internal functions to have an sg_ prefix so they don't
collide with those from other libraries. In particular, strlcpy and
strlcat are now called sg_strlcpy and sg_strlcat and are always
included.

Fix saidar and statgrab to use the new API.

Revision 1.4 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:58:05 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.3: +10 -5 lines
Diff to previous 1.3
Fix the strict-aliasing problem in a clean, sensible way that actually
works.

As a bonus, we now get a "value computed is not used" warning from GCC
if we don't check the return value of VECTOR_RESIZE. (This is dubiously
a bonus when it's being resized to 0, but it's not going to hurt to
check even then -- we might support destructors failing in the future.)

Revision 1.3 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:45:17 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.2: +9 -8 lines
Diff to previous 1.2
Fix the strict-aliasing warnings.

This is even uglier than the previous code, since it pushes a test for a
sentinel value into the VECTOR_RESIZE macro. I'm pretty certain that the
pointer-to-static-used-as-sentinel is my own invention. I'm not entirely
convinced that it's a good idea, but I can't see anything technically
wrong with it...

Revision 1.2 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:20:05 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.1: +5 -5 lines
Diff to previous 1.1
Deal with vectors as char ** rather than void **, so we can do pointer
arithmetic without Sun cc complaining.

Revision 1.1 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:17:58 2004 UTC (20 years ago) by ats
Branch: MAIN
Add generic vector-handling code. This can be used to implement
resizable arrays of objects with optional initialisation/destruction
functions.

Convenience Links

Links to HEAD: (view) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a