home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / profile1.zip / PROUSER.C < prev   
C/C++ Source or Header  |  1991-01-26  |  928b  |  70 lines

  1. /* prouser.c */
  2.  
  3. #define INCL_DOSMEMMGR
  4. #define INCL_DOSPROCESS
  5. #define PROFILE 1
  6.  
  7. #include <os2.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11. #include "profile.h"
  12.  
  13.  
  14. PROMESSAGE   *pPM;
  15.  
  16.  
  17. USHORT fnusIPro(VOID)
  18. {
  19.   SEL selMessage;
  20.  
  21.   if(DosGetShrSeg(PRO_MEM, &selMessage))
  22.     return TRUE;
  23.   pPM = MAKEP(selMessage,0);
  24.   pPM->sCode = PRO_START;
  25.   DosSleep(20L);
  26.   pPM->asStack[0] =
  27.   pPM->sCode = 1;
  28.   return FALSE;
  29. }
  30.  
  31. VOID fnvXPro(VOID)
  32. {
  33.   pPM->sCode = PRO_EXIT;
  34.   DosSleep(20L);
  35.   DosFreeSeg(SELECTOROF(pPM));
  36.   return;
  37. }
  38.  
  39. USHORT fnus2(VOID)
  40. {
  41.   ENTER(2);
  42.   DosSleep(500L);
  43.   LEAVE;
  44.   return 0;
  45. }
  46.  
  47. USHORT fnus3(VOID)
  48. {
  49.   ENTER(3);
  50.   DosSleep(1500L);
  51.   SET(4);
  52.   DosSleep(500L);
  53.   LEAVE;
  54.   return 0;
  55. }
  56.  
  57. int cdecl main(void)
  58. {
  59.   SETUP_PRO;
  60.  
  61.   DosSleep(500L);
  62.   fnus2();
  63.   DosSleep(500L);
  64.   fnus3();
  65.   DosSleep(500L);
  66.  
  67.   EXIT_PRO;
  68.   return 0;
  69. }
  70.