# To subscribers of the xforms list from joel <joel@dabbles-n-doodads.com> :
Actually, I'm looking for an empty string not if a pointer is null. So,
strcmp(string,"") works fine. I'm not sure why NULL works under
HPUX. I checked how its defined, and NULL = 0 under both OS's.
So maybe either the compiler or the implementation of strcmp under
HPUX views NULL as an empty string? Anyhow, as someone else
emailed me strcmp(string,"") is really what I meant to do and works
fine under both OS's.
Thanks
Joel
Steve Lamont wrote:
> # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
>
> > if((strcmp(project.proj_name,NULL)) == 0) <----------- this is where the
> > fault occures
>
> Perhaps I'm missing something but I'd *expect* this to core dump.
>
> You're explicitly feeding strcmp() a NULL pointer.
>
> If you're trying to test whether `project.proj_name' is NULL, you
> should do
>
> if ( project.proj_name == NULL ) [
>
> ...
>
> }
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Thu Nov 23 2000 - 11:01:31 EST