ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/vector.h
Revision 1.7 - (view) (annotate) - [select for diffs]
Tue Apr 6 14:54:48 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.6: +23 -0 lines
Diff to previous 1.6
Add header block.

Revision 1.6 - (view) (annotate) - [select for diffs]
Mon Apr 5 15:40:15 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5
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.5 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:58:05 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.4: +6 -16 lines
Diff to previous 1.4
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.4 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:45:17 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.3: +17 -3 lines
Diff to previous 1.3
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.3 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:20:05 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2
Deal with vectors as char ** rather than void **, so we can do pointer
arithmetic without Sun cc complaining.

Revision 1.2 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:33:08 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.1: +14 -7 lines
Diff to previous 1.1
Add a macro for declaring static vectors too.

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