home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / showtype.zip / patches.os2 < prev    next >
Text File  |  1993-06-11  |  2KB  |  77 lines

  1. diff -c old/apptype.c new/apptype.c
  2. *** old/apptype.c    Wed Mar 24 09:23:04 1993
  3. --- new/apptype.c    Fri Jun 11 15:36:34 1993
  4. ***************
  5. *** 5,16 ****
  6.   #define INCL_DOSSESMGR
  7.   #define INCL_DOSERRORS
  8.   #include <os2.h>
  9.   #include <stdio.h>
  10.   
  11.   int main (int argc, char *argv[])
  12.   {
  13. !   int result, i;
  14. !   ULONG rc, type;
  15.   
  16.   #ifdef __EMX__
  17.     _wildcard (&argc, &argv);
  18. --- 5,24 ----
  19.   #define INCL_DOSSESMGR
  20.   #define INCL_DOSERRORS
  21.   #include <os2.h>
  22. + #if defined (MSC)
  23. + #include "fapptyp.h"
  24. + typedef USHORT APPTYPE;
  25. + #define DosQueryAppType(filename, type)    DosQAppType(filename, type)
  26. + #else
  27. + typedef ULONG APPTYPE;
  28. + #endif
  29.   #include <stdio.h>
  30.   
  31.   int main (int argc, char *argv[])
  32.   {
  33. !     int result, i;
  34. !    APPTYPE rc, type;
  35.   
  36.   #ifdef __EMX__
  37.     _wildcard (&argc, &argv);
  38. ***************
  39. *** 57,64 ****
  40.               printf (" PM executable");
  41.             else
  42.               printf (" OS/2 executable");
  43. -           putchar ('\n');
  44.           }
  45.       }
  46.     return (0);
  47.   }
  48. --- 65,84 ----
  49.               printf (" PM executable");
  50.             else
  51.               printf (" OS/2 executable");
  52.           }
  53. +       switch(type & (FAPPTYP_NOTWINDOWCOMPAT |
  54. +                FAPPTYP_WINDOWCOMPAT | FAPPTYP_WINDOWAPI)) {
  55. +       case FAPPTYP_NOTWINDOWCOMPAT:
  56. +         printf(" [NOTWINDOWCOMPAT]");
  57. +         break;
  58. +       case FAPPTYP_WINDOWCOMPAT:
  59. +         printf(" [WINDOWCOMPAT]");
  60. +         break;
  61. +       case FAPPTYP_WINDOWAPI:
  62. +          printf(" [WINDOWAPI]");
  63. +          break;
  64. +       }
  65. +       putchar ('\n');
  66.       }
  67.     return (0);
  68.   }
  69. Only in new: apptype.def
  70. Only in new: apptype.exe
  71. Only in new: apptype32.def
  72. Only in new: fapptyp.h
  73. Only in new: makefile.os2
  74. Only in new: notes.txt
  75. Only in new: readme.txt
  76.