File: wncmp.man

package info (click to toggle)
libwn6 6.0-17
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 6,012 kB
  • ctags: 3,903
  • sloc: ansic: 45,078; makefile: 960; csh: 274; sh: 17
file content (50 lines) | stat: -rw-r--r-- 1,431 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
NAME
     wncmp -- comparison functions for sorting and sorted trees.

SYNOPSIS
     #include "wncmp.h"

     int wn_intcmp(int i1,int i2)

     int wn_ptrcmp(ptr p1,ptr p2)

     int wn_ptrNULLcmp(bool &success,ptr p1,ptr p2)

     int wn_boolcmp(bool b1,bool b2)

     int wn_doublecmp(double d1,double d2)

     int wn_pdoublecmp(double *pd1,double *pd2)

     int wn_numstrcmp(char s1[],s2[])

     int wn_memcmp(ptr m1,ptr m2,int len)

DESCRIPTION
     These routines are designed to assist in sorting (see wnsort) and in
     building sorted trees (see wnbtr).  They return an int
     >, ==, or < than zero, according to whether arg 1 is >, ==, or <
     than arg 2.

     "wn_numstrcmp" compares strings "s1" that "s2" so that the intuitively
     correct notion of numerical order is respected.  Thus, the
     string "var9" is < "var10", according to "wn_numstrcmp".
     Similarly, "var99" < "var100", "x99y" < "x200y", etc.

     "wn_ptrNULLcmp" sets "success" to TRUE iff "p1" or "p2" is NULL.
     If "p1" and "p2" are NULL, it returns 0.  If "p1" is NULL but
     "p2" is not NULL, it returns a number < 0.  If "p1" is not NULL but
     "p2" is NULL, it returns a number > 0.  This function is useful for
     constructing complicated linked structure compares where it is possible
     for some pointers to be NULL.

DIAGNOSTICS
  
BUGS

SEE ALSO
     wnsort, wnbtr, wnbtrl, wnhtbl, wncpy

AUTHOR
     Will Naylor