Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    short _FAR _grstatus( void );

Description:
    The _grstatus function returns the status of the most recently called
    graphics library function.  The function can be called after any
    graphics function to determine if any errors or warnings occurred.  The
    function returns 0 if the previous function was successful.  Values less
    than 0 indicate an error occurred; values greater than 0 indicate a
    warning condition.

    The following values can be returned:


         Constant              Value  Explanation

         _GROK                   0    no error
         _GRERROR               -1    graphics error
         _GRMODENOTSUPPORTED    -2    video mode not supported
         _GRNOTINPROPERMODE     -3    function n/a in this mode
         _GRINVALIDPARAMETER    -4    invalid parameter(s)
         _GRINSUFFICIENTMEMORY  -5    out of memory
         _GRFONTFILENOTFOUND    -6    can't open font file
         _GRINVALIDFONTFILE     -7    font file has invalid format
         _GRNOOUTPUT             1    nothing was done
         _GRCLIPPED              2    output clipped


Returns:
    The _grstatus function returns the status of the most recently called
    graphics library function.

Example:
    #include <conio.h>
    #include <graph.h>
    #include <stdlib.h>

    main()
    {
        int x, y;

        _setvideomode( _VRES16COLOR );
        while( _grstatus() == _GROK ) {
            x = rand() % 700;
            y = rand() % 500;
            _setpixel( x, y );
        }
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson