[comp.windows.x.motif] Mri & Wcl Version 1.03 Minor Fix

david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) (08/07/90)

If you have had problems compiling the latest version
of the Widget Creation Library, Mri, and Ari when using
SunOS 4.0 cc, it is because I used the ANSI C library function
strstr in WcCallb.c

Here are the 3 places strstr is referenced in WcCallb.c:
    /* Try this heuristic: if the resource type has "Widget" somewhere within
    ** it, then see if we can convert the resource value to a widget using
    ** WcFullNameToWidget.  This allow relative naming from the calling
    ** widget, including `this' or ^^foobar.
    ** strstr( res_type, "Widget") returns NULL if "Widget" is not in res_type
    */
    if ( strstr( res_type, "Widget")
#ifdef MOTIF
        || strstr( res_type, "Window")  /* wrong: but that's a menuWidget */
#endif
        )

You can change the `strstr' to `strtok' and everything will work fine.

This fix will be in Wc 1.04.

-------------------------------------------------------------------------
David Smyth                             david@jpl-devvax.jpl.nasa.gov
Senior Software Engineer,               seismo!cit-vax!jpl-devvax!david
X and Object Guru.                      (818)393-0983
Jet Propulsion Lab, M/S 230-103, 4800 Oak Grove Drive, Pasadena, CA 91109
--------------------------- Quote of the Day: ---------------------------
   "A Guru is not one who simply knows all the answers.  Rather, a
    Guru is like one who walks among the mountains, and by wandering
    around abit, can see the horizon through long narrow canyons."
-------------------------------------------------------------------------