home *** CD-ROM | disk | FTP | other *** search
- { Author:
- 7/17/88 Michael Shunfenthal Compuserve ID [76320,122]
-
- This program tests the graphics search function in file GRINITUN:
- Determine the adapter type, and search for the driver file. For more
- info, refer to the file GRINIT.DOC.
- }
- program grinitdriver;
- uses graph, grinitun;
-
- var
- foundgraphdriver : boolean;
- drenvironvar,
- drdirfound : string;
- drGraphDriver : integer;
- drgrdebug : 0..2;
-
- begin {main procedure}
- drenvironvar := 'path'; { you don't have to set this value to
- specify the default;
- '' (a null string) will do }
- drgrdebug := 2; { verbose listing of grsearch operations.
- change to 0 to rely solely on the
- return value of the function }
- foundgraphdriver := grsearch
- (drenvironvar, drGraphDriver, drdirfound, drgrdebug);
- { to avoid the use of extra variables, the above can be replaced by:
- foundgraphdriver := grsearch ('', drGraphDriver, drdirfound, 2);
- }
- if foundgraphdriver
- then
- begin
- outtextxy( 0, 20,
- 'Graphics mode enabled...');
- outtextxy( 0, 40, '(press <return>) to return to text mode');
- readln;
- CloseGraph
- end
- else
- writeln( 'Sorry fella.. something went wrong.');
- end. {main procedure}
-