File: wnnull.man

package info (click to toggle)
libwn6 6.0-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,996 kB
  • ctags: 3,938
  • sloc: ansic: 45,083; makefile: 926; csh: 274; sh: 12
file content (39 lines) | stat: -rw-r--r-- 1,218 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
NAME
     wnnull -- functions to deal with possibly NULL pointers.

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

     bool wn_ptrNULLeq(&success,p1,p2)
     bool success;
     ptr p1,p2;

DESCRIPTION
     "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.  If both "p1" and "p2" are not
     NULL, it returns 0.  This function is useful for
     constructing complicated linked structure compares where it is possible
     for some pointers to be NULL.

     "wn_ptrNULLeq" sets "success" to TRUE iff "p1" or "p2" is NULL.
     If "p1" and "p2" are NULL, it returns TRUE.  If "p1" is NULL but
     "p2" is not NULL, it returns FALSE.  If "p1" is not NULL but
     "p2" is NULL, it returns FALSE.  If both "p1" and "p2" are not
     NULL, it returns TRUE.  This function is useful for
     constructing complicated linked structure equal functions where 
     it is possible for some pointers to be NULL.

DIAGNOSTICS
  
BUGS

SEE ALSO
     wnsrtl, wnhtbl

AUTHOR
     Will Naylor