home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 240.lha / PickPacket_v1.0 / Sources / stfh.c < prev    next >
C/C++ Source or Header  |  1989-05-04  |  3KB  |  102 lines

  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
  2. * |_o_o|\\ Copyright (c) 1989 The Software Distillery.                    *
  3. * |. o.| ||          All Rights Reserved                                  *
  4. * | .  | ||          Written by John Toebes and Doug Walker               *
  5. * | o  | ||          The Software Distillery                              *
  6. * |  . |//           235 Trillingham Lane                                 *
  7. * ======             Cary, NC 27513                                       *
  8. *                    BBS:(919)-471-6436                                   *
  9. \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  10. #include "pickpack.h"
  11. #include "struct.h"
  12. #include "fhgen.h"
  13.  
  14. static struct IntuiText IText =
  15. {
  16.     1,0,JAM2,   /* front and back text pens, drawmode and fill byte */
  17.     0,0,        /* XY origin relative to container TopLeft */
  18.     &TOPAZ80,   /* font pointer or NULL for default */
  19.     NULL,       /* pointer to text */
  20.     NULL        /* next IntuiText structure */
  21. };
  22.  
  23. static struct IntuiText NameText = {
  24.     3,0,JAM2,   /* front and back text pens, drawmode and fill byte */
  25.     0,0,        /* XY origin relative to container TopLeft */
  26.     &TOPAZ80,   /* font pointer or NULL for default */
  27.     NULL,       /* pointer to text */
  28.     NULL        /* next IntuiText structure */
  29. };
  30.  
  31.  
  32. void stfhnew(nw, it, stnode)
  33. struct NewWindow **nw;
  34. struct IntuiText **it;
  35. struct STNODE *stnode;
  36. {
  37.    *nw = &NewWindowStructure1;
  38.    *it = NULL;
  39.    return;
  40. }
  41.  
  42.  
  43. /* Display the struct FileHandle */
  44. int stfhdisp(n)
  45. struct STNODE *n;
  46. {
  47.    char data[100];
  48.    struct FileHandle *fh;
  49.    char *p;
  50.    INITTEXT(14)
  51.  
  52.    BUG(1, ("stfhdisp: Entry, stnode 0x%08x window 0x%08x\n", n, n->w))
  53.  
  54.    fh = n->d.fh;
  55.  
  56.    NameText.IText = (UBYTE *)data;
  57.  
  58.    if (n->oname && n->oname[0] != ' ')
  59.       sprintf(data, "Opened as: %s", n->oname);
  60.    else
  61.       sprintf(data, "Not currently active                      ");
  62.    SHOWNAME
  63.  
  64.    sprintf(data, " fh_Link: 0x%08x (Unused)", fh->fh_Link);
  65.    SHOWTEXT
  66.  
  67.    if (fh->fh_Port) p = "(INTERACTIVE)    ";
  68.    else             p = "(NON-INTERACTIVE)";
  69.    sprintf(data, " fh_Port: 0x%08x", fh->fh_Port);
  70.    SHOWTEXT
  71.  
  72.    sprintf(data, " fh_Type: 0x%08x (Handler Process)", fh->fh_Type);
  73.    SHOWTEXT
  74.  
  75.    sprintf(data, "  fh_Buf: 0x%08x (Internal Buffer)", fh->fh_Buf);
  76.    SHOWTEXT
  77.  
  78.    sprintf(data, "  fh_Pos: 0x%08x (Internal Position)", fh->fh_Pos);
  79.    SHOWTEXT
  80.  
  81.    sprintf(data, "  fh_End: 0x%08x (Internal End Pos)", fh->fh_End);
  82.    SHOWTEXT
  83.  
  84.    sprintf(data, "fh_Func1: 0x%08x (Read Function)", fh->fh_Func1);
  85.    SHOWTEXT
  86.  
  87.    sprintf(data, "fh_Func2: 0x%08x (Write Function)", fh->fh_Func2);
  88.    SHOWTEXT
  89.  
  90.    sprintf(data, "fh_Func3: 0x%08x (Close Function)", fh->fh_Func3);
  91.    SHOWTEXT
  92.  
  93.    sprintf(data, " fh_Arg1: 0x%08x (Handler Dependent)", fh->fh_Arg1);
  94.    SHOWTEXT
  95.  
  96.    sprintf(data, " fh_Arg2: 0x%08x (Handler Dependent)", fh->fh_Arg2);
  97.    SHOWTEXT
  98.  
  99.    BUG(1, ("stfhdisp: Exit\n"))
  100.    return(RC_OK);
  101. }
  102.