home *** CD-ROM | disk | FTP | other *** search
- -------------------- TYPIST NOTES -------------------
-
- See remarks in MCB.C to see where this program comes from. The files
- on this disk associated with MCB.C are MC*.*. There have been corrections
- added to the original MCB.C to get it to work. They appear below:
-
- 1. The statement in main():
- ptrmcb = (PTRMCB)(((unsigned long)(ptr->psize + 1) << 16) + ptrmcb);
- was originally:
- ptrmcb += ptrmcb->psize + 1;
- The original statement added to the offset instead of to the segment
- of ptrmcb and hence the change.
- 2. A variable, 'escape', was added to code in prn_pid_own() to escape from
- the while (envsize) loop. The while was changed to:
- while (envsize && escape)
- 3. Also in prn_pid_own(), the statement:
- if (!*envptr && *(envptr + 2) == 0x1)
- was originally:
- if (!*envptr && *(unsigned far *) (envptr + 1) == 0x1)
- 4. Also in prn_pid_own(), the statement:
- envptr += 4;
- was originally:
- envptr += 3;
- and the statement: escape = 0; was added.
-
- I used Power C to compile and link MCB.C. Although I have provisions in
- MCB.C to compile with Quick C, it will not work after it's compiled and
- linked. I suspect a compiler bug. Quick C insists on making the MCB structure
- 18 bytes instead of 16 bytes as required. This wreaks havoc on the pointer
- arithmetic to chain through the MCB's. Also, although the structure's first
- element is a char, Quick C increments by 2 instead of 1 when the second
- element (an unsigned int) is accessed giving the wrong value. This seems to
- matter only with an existing structure in memory (which the MCB is) and a
- structure is declared to match it. A structure declared and filled with
- assignment statements still increments a char by 2 but the correct value is
- returned when accessing the unsigned int following.
-
- As noted in the MCB.C notes, the small model is used to compile. However,
- with Power C I don't think it matters which command line switch is used. I have
- never gotten them to work.