home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / NETCLB35.ZIP / NETCLB35.EXE / EXAMPLES / SHELLINF.C < prev    next >
C/C++ Source or Header  |  1996-01-03  |  2KB  |  47 lines

  1. /***************************************************************************/
  2. /* File:             SHELLINF.C                                            */
  3. /*                                                                         */
  4. /* Function:         Output information about the workstation shell.       */
  5. /*                                                                         */
  6. /* Usage:            shellinf                                              */
  7. /*                                                                         */
  8. /* Functions Called: GetNetwareShellVersion                                */
  9. /*                   ISShellLoaded                                         */
  10. /*                                                                         */
  11. /***************************************************************************/
  12. #include <stdio.h>
  13. #include <string.h>
  14.  
  15. #include "netware.h"
  16.  
  17. static char *types[] = { "      OS type","   OS version",
  18.                          "   HWARE type","Short HW type"};
  19.  
  20. void main(void)
  21. {
  22. char info[40];
  23. byte major_v,minor_v,level,shelltype;
  24. char *p;
  25. int i;
  26. char *memtypes[] = { " ","EMS","XMS" };
  27.  
  28.    if (IsShellLoaded() != SUCCESS)
  29.    {
  30.       printf("*** No netware shell loaded ***\n");
  31.       return;
  32.    }
  33.  
  34.    GetNetwareShellVersion(info,&major_v,&minor_v,&level,&shelltype);
  35.    
  36.    printf("\n        Shell: %02.2d.%02.2d%c %s\n\n",
  37.           major_v,minor_v,level+'A',memtypes[shelltype]);
  38.    p=info;
  39.    for(i=0;i<4;i++)
  40.    {
  41.       printf("%s: %s\n",types[i],p);
  42.       p+=strlen(p);
  43.       p++;
  44.    }
  45. }
  46.  
  47.