home *** CD-ROM | disk | FTP | other *** search
-
-
- *****Listing 3*****
-
- void someproc(p)
- something * p;
- {
- #if DEBUG
- if(!p)
- {
- if(report_null_pointer("someproc: p"))
- return;
- }
- #endif
- }
-
- and use a target procedure which consists of
-
- short report_null_pointer(where)
- char * where;
- {
- fprintf(stderr,"NULL POINTER: %s\n",where);
- return stop(where);
- }
-
- **********
-
-