DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: d

⟦602dc41a1⟧

    Length: 20751 (0x510f)
    Names: »dpy.doc«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Dpy/dpy.doc« 

Hex Dump

0x0000…0020 0a 0a 0a 44 50 59 28 33 29 09 09 20 20 20 20 55 4e 49 58 20 50 72 6f 67 72 61 6d 6d 65 72 27 73   ┆   DPY(3)      UNIX Programmer's┆
0x0020…0040 20 4d 61 6e 75 61 6c 09 09 20 20 20 44 50 59 28 33 29 0a 0a 0a 0a 4e 41 4d 45 0a 20 20 20 20 20   ┆ Manual     DPY(3)    NAME      ┆
0x0040…0060 64 70 79 20 2d 20 6e 65 77 20 73 63 72 65 65 6e 20 75 70 64 61 74 69 6e 67 20 72 6f 75 74 69 6e   ┆dpy - new screen updating routin┆
0x0060…0080 65 73 0a 0a 53 59 4e 4f 50 53 49 53 0a 20 20 20 20 20 64 70 79 69 6e 69 74 28 74 74 79 74 79 70   ┆es  SYNOPSIS      dpyinit(ttytyp┆
0x0080…00a0 65 2c 20 6d 6f 64 65 73 74 72 69 6e 67 29 0a 20 20 20 20 20 63 68 61 72 20 2a 74 74 79 74 79 70   ┆e, modestring)      char *ttytyp┆
0x00a0…00c0 65 2c 20 2a 6d 6f 64 65 73 74 72 69 6e 67 3b 0a 0a 20 20 20 20 20 64 70 79 77 69 6e 64 6f 77 28   ┆e, *modestring;       dpywindow(┆
0x00c0…00e0 6d 69 6e 72 6f 77 2c 20 6d 61 78 72 6f 77 2c 20 6d 69 6e 63 6f 6c 2c 20 6d 61 78 63 6f 6c 29 0a   ┆minrow, maxrow, mincol, maxcol) ┆
0x00e0…0100 20 20 20 20 20 69 6e 74 20 6d 69 6e 72 6f 77 2c 20 6d 61 78 72 6f 77 2c 20 6d 69 6e 63 6f 6c 2c   ┆     int minrow, maxrow, mincol,┆
0x0100…0120 20 6d 61 78 63 6f 6c 3b 0a 0a 20 20 20 20 20 64 70 79 72 65 61 64 28 70 72 6f 6d 70 74 2c 20 72   ┆ maxcol;       dpyread(prompt, r┆
0x0120…0140 6f 75 74 69 6e 65 2c 20 62 75 66 2c 20 63 6f 75 6e 74 29 0a 20 20 20 20 20 63 68 61 72 20 2a 70   ┆outine, buf, count)      char *p┆
0x0140…0160 72 6f 6d 70 74 3b 0a 20 20 20 20 20 69 6e 74 20 28 2a 72 6f 75 74 69 6e 65 29 28 29 3b 0a 20 20   ┆rompt;      int (*routine)();   ┆
0x0160…0180 20 20 20 63 68 61 72 20 2a 62 75 66 3b 0a 20 20 20 20 20 69 6e 74 20 63 6f 75 6e 74 3b 0a 0a 20   ┆   char *buf;      int count;   ┆
0x0180…01a0 20 20 20 20 64 70 79 6d 6f 76 65 28 72 6f 77 2c 20 63 6f 6c 29 0a 20 20 20 20 20 69 6e 74 20 72   ┆    dpymove(row, col)      int r┆
0x01a0…01c0 6f 77 2c 20 63 6f 6c 3b 0a 0a 20 20 20 20 20 64 70 79 70 6c 61 63 65 28 72 6f 77 2c 20 63 6f 6c   ┆ow, col;       dpyplace(row, col┆
0x01c0…01e0 2c 09 63 68 29 0a 20 20 20 20 20 69 6e 74 20 72 6f 77 2c 20 63 6f 6c 3b 0a 20 20 20 20 20 63 68   ┆, ch)      int row, col;      ch┆
0x01e0…0200 61 72 20 63 68 3b 0a 0a 20 20 20 20 20 64 70 79 77 72 69 74 65 28 62 75 66 2c 20 63 6f 75 6e 74   ┆ar ch;       dpywrite(buf, count┆
0x0200…0220 29 0a 20 20 20 20 20 63 68 61 72 20 2a 62 75 66 3b 0a 20 20 20 20 20 69 6e 74 20 63 6f 75 6e 74   ┆)      char *buf;      int count┆
0x0220…0240 3b 0a 0a 20 20 20 20 20 64 70 79 70 72 69 6e 74 66 28 66 6d 74 20 5b 2c 61 72 67 73 5d 20 2e 2e   ┆;       dpyprintf(fmt [,args] ..┆
0x0240…0260 2e 29 0a 20 20 20 20 20 63 68 61 72 20 2a 66 6d 74 3b 0a 0a 20 20 20 20 20 64 70 79 63 68 61 72   ┆.)      char *fmt;       dpychar┆
0x0260…0280 28 63 68 29 0a 20 20 20 20 20 63 68 61 72 20 63 68 3b 0a 0a 20 20 20 20 20 64 70 79 73 74 72 28   ┆(ch)      char ch;       dpystr(┆
0x0280…02a0 73 74 72 29 0a 20 20 20 20 20 63 68 61 72 20 2a 73 74 72 3b 0a 0a 20 20 20 20 20 64 70 79 67 65   ┆str)      char *str;       dpyge┆
0x02a0…02c0 74 28 72 6f 77 2c 20 63 6f 6c 29 0a 20 20 20 20 20 69 6e 74 20 72 6f 77 2c 20 63 6f 6c 3b 0a 0a   ┆t(row, col)      int row, col;  ┆
0x02c0…02e0 20 20 20 20 20 64 70 79 63 6c 72 6c 69 6e 65 28 29 0a 0a 20 20 20 20 20 64 70 79 63 6c 72 77 69   ┆     dpyclrline()       dpyclrwi┆
0x02e0…0300 6e 64 6f 77 28 29 0a 0a 20 20 20 20 20 64 70 79 68 6f 6d 65 28 29 0a 0a 20 20 20 20 20 64 70 79   ┆ndow()       dpyhome()       dpy┆
0x0300…0320 67 65 74 72 6f 77 28 29 0a 0a 20 20 20 20 20 64 70 79 67 65 74 63 6f 6c 28 29 0a 0a 20 20 20 20   ┆getrow()       dpygetcol()      ┆
0x0320…0340 20 64 70 79 75 70 64 61 74 65 28 29 0a 0a 20 20 20 20 20 64 70 79 72 65 64 72 61 77 28 29 0a 0a   ┆ dpyupdate()       dpyredraw()  ┆
0x0340…0360 0a 0a 50 72 69 6e 74 65 64 09 33 2f 37 2f 38 35 09 09 20 20 37 20 4d 61 72 63 68 20 31 39 38 35   ┆  Printed 3/7/85    7 March 1985┆
0x0360…0380 09 09 09 09 31 0a 0a 0a 0a 0a 0a 0a 44 50 59 28 33 29 09 09 20 20 20 20 55 4e 49 58 20 50 72 6f   ┆    1       DPY(3)      UNIX Pro┆
0x0380…03a0 67 72 61 6d 6d 65 72 27 73 20 4d 61 6e 75 61 6c 09 09 20 20 20 44 50 59 28 33 29 0a 0a 0a 0a 20   ┆grammer's Manual     DPY(3)     ┆
0x03a0…03c0 20 20 20 20 64 70 79 73 74 6f 70 28 29 0a 0a 20 20 20 20 20 64 70 79 63 6c 6f 73 65 28 29 0a 0a   ┆    dpystop()       dpyclose()  ┆
0x03c0…03e0 44 45 53 43 52 49 50 54 49 4f 4e 0a 20 20 20 20 20 5f 08 44 5f 08 70 5f 08 79 20 69 73 20 61 20   ┆DESCRIPTION      _ D_ p_ y is a ┆
0x03e0…0400 74 65 72 6d 69 6e 61 6c 20 64 69 73 70 6c 61 79 20 70 61 63 6b 61 67 65 20 6d 75 63 68 20 6c 69   ┆terminal display package much li┆
0x0400…0420 6b 65 20 5f 08 63 5f 08 75 5f 08 72 5f 08 73 5f 08 65 5f 08 73 28 33 29 2e 20 20 48 6f 77 2d 0a   ┆ke _ c_ u_ r_ s_ e_ s(3).  How- ┆
0x0420…0440 20 20 20 20 20 65 76 65 72 2c 20 5f 08 64 5f 08 70 5f 08 79 20 64 6f 65 73 20 6e 6f 74 09 70 72   ┆     ever, _ d_ p_ y does not pr┆
0x0440…0460 6f 76 69 64 65 09 61 6c 6c 20 6f 66 20 74 68 65 20 63 61 70 61 62 69 6c 69 74 69 65 73 09 6f 66   ┆ovide all of the capabilities of┆
0x0460…0480 0a 20 20 20 20 20 5f 08 63 5f 08 75 5f 08 72 5f 08 73 5f 08 65 5f 08 73 2c 20 62 75 74 20 69 6e   ┆      _ c_ u_ r_ s_ e_ s, but in┆
0x0480…04a0 73 74 65 61 64 20 74 72 69 65 73 20 74 6f 20 66 6f 63 75 73 09 6f 6e 20 74 68 65 20 66 6f 6c 6c   ┆stead tries to focus on the foll┆
0x04a0…04c0 6f 77 69 6e 67 20 74 77 6f 0a 20 20 20 20 20 67 6f 61 6c 73 3a 0a 0a 20 20 20 20 20 31 2e 09 20   ┆owing two      goals:       1.  ┆
0x04c0…04e0 20 41 6c 6c 6f 77 09 74 68 65 20 70 72 6f 67 72 61 6d 6d 65 72 20 74 6f 20 65 61 73 69 6c 79 20   ┆ Allow the programmer to easily ┆
0x04e0…0500 64 65 66 69 6e 65 09 61 6e 64 20 75 70 64 61 74 65 20 6d 61 6e 79 0a 09 20 20 64 69 66 66 65 72   ┆define and update many    differ┆
0x0500…0520 65 6e 74 20 72 65 63 74 61 6e 67 6c 65 73 20 6f 66 20 64 61 74 61 20 6f 6e 20 74 68 65 20 73 63   ┆ent rectangles of data on the sc┆
0x0520…0540 72 65 65 6e 20 61 74 09 74 68 65 20 73 61 6d 65 0a 09 20 20 74 69 6d 65 2e 0a 0a 20 20 20 20 20   ┆reen at the same    time.       ┆
0x0540…0560 32 2e 09 20 20 42 65 20 61 73 09 66 61 73 74 20 61 73 09 70 6f 73 73 69 62 6c 65 2e 0a 0a 20 20   ┆2.   Be as fast as possible.    ┆
0x0560…0580 20 20 20 41 20 74 75 74 6f 72 69 61 6c 09 6f 6e 20 74 68 65 20 75 73 61 67 65 20 6f 66 09 5f 08   ┆   A tutorial on the usage of _ ┆
0x0580…05a0 64 5f 08 70 5f 08 79 20 61 70 70 65 61 72 73 20 6c 61 74 65 72 20 69 6e 20 74 68 69 73 20 64 6f   ┆d_ p_ y appears later in this do┆
0x05a0…05c0 63 75 2d 0a 20 20 20 20 20 6d 65 6e 74 2e 20 20 54 68 65 09 72 65 6d 61 69 6e 64 65 72 20 6f 66   ┆cu-      ment.  The remainder of┆
0x05c0…05e0 20 74 68 69 73 20 73 65 63 74 69 6f 6e 20 64 65 73 63 72 69 62 65 73 20 74 68 65 09 70 72 6f 2d   ┆ this section describes the pro-┆
0x05e0…0600 0a 20 20 20 20 20 63 65 64 75 72 65 73 2e 0a 0a 20 20 20 20 20 5f 08 44 5f 08 70 5f 08 79 5f 08   ┆      cedures.       _ D_ p_ y_ ┆
0x0600…0620 69 5f 08 6e 5f 08 69 5f 08 74 20 6d 75 73 74 20 62 65 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 65   ┆i_ n_ i_ t must be called before┆
0x0620…0640 20 61 6e 79 20 6f 74 68 65 72 20 63 61 6c 6c 20 74 6f 20 5f 08 64 5f 08 70 5f 08 79 20 28 5f 08   ┆ any other call to _ d_ p_ y (_ ┆
0x0640…0660 65 5f 08 78 5f 08 63 5f 08 65 5f 08 70 5f 08 74 0a 20 20 20 20 20 5f 08 66 5f 08 6f 5f 08 72 20   ┆e_ x_ c_ e_ p_ t      _ f_ o_ r ┆
0x0660…0680 5f 08 64 5f 08 70 5f 08 79 5f 08 63 5f 08 6c 5f 08 6f 5f 08 73 5f 08 65 29 2e 20 20 49 74 09 61   ┆_ d_ p_ y_ c_ l_ o_ s_ e).  It a┆
0x0680…06a0 6c 6c 6f 63 61 74 65 73 20 6d 65 6d 6f 72 79 20 66 6f 72 20 74 77 6f 20 73 63 72 65 65 6e 09 69   ┆llocates memory for two screen i┆
0x06a0…06c0 6d 61 67 65 73 2c 0a 20 20 20 20 20 64 65 66 69 6e 65 73 20 74 68 65 20 63 75 72 72 65 6e 74 20   ┆mages,      defines the current ┆
0x06c0…06e0 77 69 6e 64 6f 77 09 74 6f 20 62 65 20 74 68 65 20 77 68 6f 6c 65 09 73 63 72 65 65 6e 2c 09 73   ┆window to be the whole screen, s┆
0x06e0…0700 65 74 73 20 74 68 65 0a 20 20 20 20 20 63 75 72 72 65 6e 74 20 77 72 69 74 65 20 6c 6f 63 61 74   ┆ets the      current write locat┆
0x0700…0720 69 6f 6e 20 74 6f 20 74 68 65 20 75 70 70 65 72 20 6c 65 66 74 20 63 6f 72 6e 65 72 20 6f 66 09   ┆ion to the upper left corner of ┆
0x0720…0740 74 68 65 0a 20 20 20 20 20 73 63 72 65 65 6e 2c 20 75 73 65 73 20 5f 08 73 5f 08 69 5f 08 67 5f   ┆the      screen, uses _ s_ i_ g_┆
0x0740…0760 08 6e 5f 08 61 5f 08 6c 28 32 29 20 74 6f 20 63 61 75 73 65 20 74 68 65 20 74 65 72 6d 69 6e 61   ┆ n_ a_ l(2) to cause the termina┆
0x0760…0780 6c 20 73 74 6f 70 20 63 68 61 72 61 63 74 65 72 0a 20 20 20 20 20 74 6f 09 74 72 61 70 20 74 6f   ┆l stop character      to trap to┆
0x0780…07a0 09 5f 08 64 5f 08 70 5f 08 79 5f 08 73 5f 08 74 5f 08 6f 5f 08 70 09 66 6f 72 20 70 72 65 74 74   ┆ _ d_ p_ y_ s_ t_ o_ p for prett┆
0x07a0…07c0 79 20 70 72 6f 67 72 61 6d 20 73 74 6f 70 70 69 6e 67 20 28 6f 6e 6c 79 20 6f 6e 20 42 53 44 0a   ┆y program stopping (only on BSD ┆
0x07c0…07e0 20 20 20 20 20 73 79 73 74 65 6d 73 29 2c 20 61 6e 64 20 73 65 74 73 09 74 68 65 20 74 65 72 6d   ┆     systems), and sets the term┆
0x07e0…0800 69 6e 61 6c 20 6d 6f 64 65 73 20 74 6f 20 61 6c 6c 6f 77 20 66 6f 72 09 74 65 72 6d 69 6e 61 6c   ┆inal modes to allow for terminal┆
0x0800…0820 0a 20 20 20 20 20 69 6e 70 75 74 20 6f 66 20 76 61 72 69 6f 75 73 20 6b 69 6e 64 73 2e 20 20 54   ┆      input of various kinds.  T┆
0x0820…0840 68 65 20 61 63 74 75 61 6c 20 74 65 72 6d 69 6e 61 6c 20 73 63 72 65 65 6e 20 69 73 20 6e 6f 74   ┆he actual terminal screen is not┆
0x0840…0860 0a 20 20 20 20 20 63 6c 65 61 72 65 64 20 75 6e 74 69 6c 20 74 68 65 20 66 69 72 73 74 20 5f 08   ┆      cleared until the first _ ┆
0x0860…0880 64 5f 08 70 5f 08 79 5f 08 75 5f 08 70 5f 08 64 5f 08 61 5f 08 74 5f 08 65 20 63 61 6c 6c 20 69   ┆d_ p_ y_ u_ p_ d_ a_ t_ e call i┆
0x0880…08a0 73 20 6d 61 64 65 2c 20 73 6f 09 74 68 61 74 20 79 6f 75 0a 20 20 20 20 20 63 61 6e 20 69 6e 69   ┆s made, so that you      can ini┆
0x08a0…08c0 74 69 61 6c 69 7a 65 20 79 6f 75 72 20 70 72 6f 67 72 61 6d 20 62 61 73 65 64 20 75 70 6f 6e 20   ┆tialize your program based upon ┆
0x08c0…08e0 74 68 65 09 74 65 72 6d 69 6e 61 6c 20 73 69 7a 65 0a 20 20 20 20 20 62 65 66 6f 72 65 20 64 65   ┆the terminal size      before de┆
0x08e0…0900 63 69 64 69 6e 67 20 74 6f 09 63 6f 6e 74 69 6e 75 65 2e 20 20 5f 08 54 5f 08 74 5f 08 79 5f 08   ┆ciding to continue.  _ T_ t_ y_ ┆
0x0900…0920 74 5f 08 79 5f 08 70 5f 08 65 20 69 73 20 61 09 73 74 72 69 6e 67 20 73 70 65 63 69 66 79 69 6e   ┆t_ y_ p_ e is a string specifyin┆
0x0920…0940 67 0a 20 20 20 20 20 74 68 65 20 74 65 72 6d 69 6e 61 6c 20 74 79 70 65 20 28 65 78 61 6d 70 6c   ┆g      the terminal type (exampl┆
0x0940…0960 65 3a 20 22 76 74 31 30 30 22 29 2c 20 6f 72 20 4e 55 4c 4c 20 74 6f 20 75 73 65 20 74 68 65 0a   ┆e: "vt100"), or NULL to use the ┆
0x0960…0980 20 20 20 20 20 76 61 6c 75 65 20 73 70 65 63 69 66 69 65 64 20 62 79 09 74 68 65 20 5f 08 54 5f   ┆     value specified by the _ T_┆
0x0980…09a0 08 45 5f 08 52 5f 08 4d 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 09 5f   ┆ E_ R_ M environment variable. _┆
0x09a0…09c0 08 4d 5f 08 6f 5f 08 64 5f 08 65 5f 08 2d 0a 20 20 20 20 20 5f 08 73 5f 08 74 5f 08 72 5f 08 69   ┆ M_ o_ d_ e_ -      _ s_ t_ r_ i┆
0x09c0…09e0 5f 08 6e 5f 08 67 20 69 73 20 61 20 73 74 72 69 6e 67 09 73 70 65 63 69 66 79 69 6e 67 20 68 6f   ┆_ n_ g is a string specifying ho┆
0x09e0…0a00 77 20 69 6e 70 75 74 20 69 73 09 74 6f 20 62 65 20 74 72 65 61 74 65 64 0a 20 20 20 20 20 66 72   ┆w input is to be treated      fr┆
0x0a00…0a20 6f 6d 20 74 68 65 20 74 65 72 6d 69 6e 61 6c 2e 09 20 45 61 63 68 20 6d 6f 64 65 20 69 73 20 73   ┆om the terminal.  Each mode is s┆
0x0a20…0a40 70 65 63 69 66 69 65 64 09 62 79 20 61 20 73 69 6e 67 6c 65 0a 20 20 20 20 20 6c 65 74 74 65 72   ┆pecified by a single      letter┆
0x0a40…0a60 2c 20 70 72 65 63 65 65 64 65 64 20 62 79 20 61 6e 20 28 6f 70 74 69 6f 6e 61 6c 29 09 70 6c 75   ┆, preceeded by an (optional) plu┆
0x0a60…0a80 73 20 73 69 67 6e 20 74 6f 20 65 6e 61 62 6c 65 20 74 68 65 0a 20 20 20 20 20 6d 6f 64 65 2c 20   ┆s sign to enable the      mode, ┆
0x0a80…0aa0 6f 72 20 70 72 65 63 65 65 64 65 64 09 62 79 20 61 20 6d 69 6e 75 73 20 73 69 67 6e 09 74 6f 20   ┆or preceeded by a minus sign to ┆
0x0aa0…0ac0 64 69 73 61 62 6c 65 20 74 68 65 20 6d 6f 64 65 2e 0a 20 20 20 20 20 4d 6f 64 65 73 20 63 61 6e   ┆disable the mode.      Modes can┆
0x0ac0…0ae0 20 62 65 20 73 65 70 61 72 61 74 65 64 20 62 79 20 73 70 61 63 65 73 2e 09 4d 6f 64 65 73 20 6e   ┆ be separated by spaces. Modes n┆
0x0ae0…0b00 6f 74 20 6d 65 6e 74 69 6f 6e 65 64 20 69 6e 0a 20 20 20 20 20 74 68 65 20 73 74 72 69 6e 67 09   ┆ot mentioned in      the string ┆
0x0b00…0b20 61 72 65 20 75 6e 63 68 61 6e 67 65 64 2e 09 54 68 65 20 63 75 72 72 65 6e 74 6c 79 20 64 65 66   ┆are unchanged. The currently def┆
0x0b20…0b40 69 6e 65 64 20 6d 6f 64 65 0a 20 20 20 20 20 6c 65 74 74 65 72 73 20 61 72 65 3a 0a 0a 20 20 20   ┆ined mode      letters are:     ┆
0x0b40…0b60 20 20 65 09 20 20 28 65 63 68 6f 29 20 45 63 68 6f 69 6e 67 20 6f 66 20 69 6e 70 75 74 20 63 68   ┆  e   (echo) Echoing of input ch┆
0x0b60…0b80 61 72 61 63 74 65 72 73 20 6f 63 63 75 72 73 2e 0a 0a 20 20 20 20 20 63 09 20 20 28 63 62 72 65   ┆aracters occurs.       c   (cbre┆
0x0b80…0ba0 61 6b 29 20 43 68 61 72 61 63 74 65 72 73 20 61 72 65 20 72 65 74 75 72 6e 65 64 20 77 69 74 68   ┆ak) Characters are returned with┆
0x0ba0…0bc0 6f 75 74 20 77 61 69 74 69 6e 67 20 66 6f 72 20 61 0a 09 20 20 6e 65 77 6c 69 6e 65 20 61 6e 64   ┆out waiting for a    newline and┆
0x0bc0…0be0 20 74 74 79 20 73 69 67 6e 61 6c 73 20 61 72 65 20 70 72 6f 63 65 73 73 65 64 2e 0a 0a 20 20 20   ┆ tty signals are processed.     ┆
0x0be0…0c00 20 20 72 09 20 20 28 72 61 77 29 09 43 68 61 72 61 63 74 65 72 73 20 61 72 65 20 72 65 74 75 72   ┆  r   (raw) Characters are retur┆
0x0c00…0c20 6e 65 64 09 65 78 61 63 74 6c 79 09 61 73 20 74 79 70 65 64 20 61 6e 64 20 74 74 79 0a 09 20 20   ┆ned exactly as typed and tty    ┆
0x0c20…0c40 73 69 67 6e 61 6c 73 20 61 72 65 20 64 69 73 61 62 6c 65 64 2e 0a 0a 20 20 20 20 20 54 68 75 73   ┆signals are disabled.       Thus┆
0x0c40…0c60 20 74 68 65 20 6e 6f 72 6d 61 6c 20 74 65 72 6d 69 6e 61 6c 20 6d 6f 64 65 73 20 62 65 66 6f 72   ┆ the normal terminal modes befor┆
0x0c60…0c80 65 20 73 74 61 72 74 69 6e 67 20 5f 08 64 5f 08 70 5f 08 79 09 61 72 65 0a 20 20 20 20 20 64 65   ┆e starting _ d_ p_ y are      de┆
0x0c80…0ca0 73 63 72 69 62 65 64 20 62 79 20 74 68 65 20 73 74 72 69 6e 67 20 22 65 09 2d 63 20 2d 72 22 2e   ┆scribed by the string "e -c -r".┆
0x0ca0…0cc0 09 20 49 66 20 5f 08 6d 5f 08 6f 5f 08 64 5f 08 65 5f 08 73 5f 08 74 5f 08 72 5f 08 69 5f 08 6e   ┆  If _ m_ o_ d_ e_ s_ t_ r_ i_ n┆
0x0cc0…0ce0 5f 08 67 20 69 73 20 61 20 4e 55 4c 4c 0a 20 20 20 20 20 70 6f 69 6e 74 65 72 2c 20 74 68 65 6e   ┆_ g is a NULL      pointer, then┆
0x0ce0…0d00 20 74 68 65 20 64 65 66 61 75 6c 74 20 6d 6f 64 65 73 20 6f 66 09 22 2d 65 20 63 22 20 61 72 65   ┆ the default modes of "-e c" are┆
0x0d00…0d20 20 75 73 65 64 2e 20 20 49 66 20 74 68 65 0a 0a 0a 0a 50 72 69 6e 74 65 64 09 33 2f 37 2f 38 35   ┆ used.  If the    Printed 3/7/85┆
0x0d20…0d40 09 09 20 20 37 20 4d 61 72 63 68 20 31 39 38 35 09 09 09 09 32 0a 0a 0a 0a 0a 0a 0a 44 50 59 28   ┆    7 March 1985    2       DPY(┆
0x0d40…0d60 33 29 09 09 20 20 20 20 55 4e 49 58 20 50 72 6f 67 72 61 6d 6d 65 72 27 73 20 4d 61 6e 75 61 6c   ┆3)      UNIX Programmer's Manual┆
0x0d60…0d80 09 09 20 20 20 44 50 59 28 33 29 0a 0a 0a 0a 20 20 20 20 20 5f 08 64 5f 08 70 5f 08 79 5f 08 72   ┆     DPY(3)         _ d_ p_ y_ r┆
0x0d80…0da0 5f 08 65 5f 08 61 5f 08 64 20 63 61 6c 6c 20 69 73 20 74 6f 09 62 65 20 75 73 65 64 09 69 6e 20   ┆_ e_ a_ d call is to be used in ┆
0x0da0…0dc0 79 6f 75 72 09 70 72 6f 67 72 61 6d 2c 20 74 68 65 6e 20 79 6f 75 20 6d 75 73 74 0a 20 20 20 20   ┆your program, then you must     ┆
0x0dc0…0de0 20 73 70 65 63 69 66 79 20 74 68 61 74 20 65 63 68 6f 69 6e 67 20 69 73 20 64 69 73 61 62 6c 65   ┆ specify that echoing is disable┆
0x0de0…0e00 64 2c 20 61 6e 64 20 74 68 61 74 09 65 69 74 68 65 72 20 63 62 72 65 61 6b 20 6f 72 0a 20 20 20   ┆d, and that either cbreak or    ┆
0x0e00…0e20 20 20 72 61 77 20 6d 6f 64 65 20 69 73 20 65 6e 61 62 6c 65 64 2e 20 20 5f 08 44 5f 08 70 5f 08   ┆  raw mode is enabled.  _ D_ p_ ┆
0x0e20…0e40 79 5f 08 69 5f 08 6e 5f 08 69 5f 08 74 20 72 65 74 75 72 6e 73 20 6e 6f 6e 7a 65 72 6f 20 77 69   ┆y_ i_ n_ i_ t returns nonzero wi┆
0x0e40…0e60 74 68 09 61 6e 20 65 72 72 6f 72 0a 20 20 20 20 20 6d 65 73 73 61 67 65 20 74 79 70 65 64 20 69   ┆th an error      message typed i┆
0x0e60…0e80 66 20 69 74 20 63 61 6e 6e 6f 74 09 69 6e 69 74 69 61 6c 69 7a 65 2e 0a 0a 20 20 20 20 20 5f 08   ┆f it cannot initialize.       _ ┆
0x0e80…0ea0 44 5f 08 70 5f 08 79 5f 08 63 5f 08 6c 5f 08 6f 5f 08 73 5f 08 65 20 68 6f 6d 65 73 20 64 6f 77   ┆D_ p_ y_ c_ l_ o_ s_ e homes dow┆
0x0ea0…0ec0 6e 20 74 6f 20 74 68 65 09 6c 6f 77 65 72 20 6c 65 66 74 20 63 6f 72 6e 65 72 20 6f 66 20 74 68   ┆n to the lower left corner of th┆
0x0ec0…0ee0 65 20 74 65 72 6d 69 6e 61 6c 0a 20 20 20 20 20 73 63 72 65 65 6e 2c 20 63 6c 65 61 72 73 20 74   ┆e terminal      screen, clears t┆
0x0ee0…0f00 68 65 09 6c 61 73 74 20 6c 69 6e 65 20 6f 66 20 74 68 65 20 73 63 72 65 65 6e 2c 20 66 72 65 65   ┆he last line of the screen, free┆
0x0f00…0f20 73 20 74 68 65 20 6d 65 6d 6f 72 79 0a 20 20 20 20 20 61 6c 6c 6f 63 61 74 65 64 20 62 79 20 5f   ┆s the memory      allocated by _┆
0x0f20…0f40 08 64 5f 08 70 5f 08 79 5f 08 69 5f 08 6e 5f 08 69 5f 08 74 2c 20 61 6e 64 20 72 65 73 74 6f 72   ┆ d_ p_ y_ i_ n_ i_ t, and restor┆
0x0f40…0f60 65 73 09 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 74 65 72 6d 69 6e 61 6c 0a 20 20 20 20 20 6d 6f   ┆es the original terminal      mo┆
0x0f60…0f80 64 65 73 2e 20 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 20 6a 75 73 74 20 62 65 66 6f 72 65   ┆des.  This is useful just before┆
0x0f80…0fa0 09 65 78 69 74 69 6e 67 09 66 72 6f 6d 20 79 6f 75 72 20 70 72 6f 2d 0a 20 20 20 20 20 67 72 61   ┆ exiting from your pro-      gra┆
0x0fa0…0fc0 6d 2e 20 20 5f 08 44 5f 08 70 5f 08 79 5f 08 63 5f 08 6c 5f 08 6f 5f 08 73 5f 08 65 20 69 73 09   ┆m.  _ D_ p_ y_ c_ l_ o_ s_ e is ┆
0x0fc0…0fe0 67 75 61 72 61 6e 74 65 65 64 20 74 6f 20 64 6f 20 6e 6f 74 68 69 6e 67 20 69 66 20 5f 08 64 5f   ┆guaranteed to do nothing if _ d_┆
0x0fe0…1000 08 70 5f 08 79 5f 08 69 5f 08 6e 5f 08 69 5f 08 74 20 68 61 73 0a 20 20 20 20 20 6e 6f 74 20 79   ┆ p_ y_ i_ n_ i_ t has      not y┆
0x1000…1020 65 74 20 62 65 65 6e 20 63 6f 6d 70 6c 65 74 65 64 2c 20 73 6f 09 74 68 61 74 20 69 74 09 69 73   ┆et been completed, so that it is┆
0x1020…1040 20 73 61 66 65 09 74 6f 20 63 61 6c 6c 09 5f 08 64 5f 08 70 5f 08 79 5f 08 63 5f 08 6c 5f 08 6f   ┆ safe to call _ d_ p_ y_ c_ l_ o┆
0x1040…1060 5f 08 73 5f 08 65 0a 20 20 20 20 20 61 74 09 61 6e 79 20 74 69 6d 65 2e 0a 0a 20 20 20 20 20 5f   ┆_ s_ e      at any time.       _┆
0x1060…1080 08 44 5f 08 70 5f 08 79 5f 08 75 5f 08 70 5f 08 64 5f 08 61 5f 08 74 5f 08 65 20 6d 61 6b 65 73   ┆ D_ p_ y_ u_ p_ d_ a_ t_ e makes┆
0x1080…10a0 20 74 68 65 20 74 65 72 6d 69 6e 61 6c 20 73 63 72 65 65 6e 20 6c 6f 6f 6b 20 6c 69 6b 65 20 74   ┆ the terminal screen look like t┆
0x10a0…10c0 68 65 20 66 75 74 75 72 65 0a 20 20 20 20 20 73 63 72 65 65 6e 20 69 6d 61 67 65 2c 20 75 73 69   ┆he future      screen image, usi┆
0x10c0…10e0 6e 67 20 61 20 6d 69 6e 69 6d 61 6c 20 61 6d 6f 75 6e 74 20 6f 66 20 74 65 72 6d 69 6e 61 6c 20   ┆ng a minimal amount of terminal ┆
0x10e0…1100 49 2f 4f 2e 20 20 54 68 65 0a 20 20 20 20 20 63 75 72 73 6f 72 20 69 73 20 61 6c 73 6f 20 70 6f   ┆I/O.  The      cursor is also po┆
0x1100…1120 73 69 74 69 6f 6e 65 64 20 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 20 77 72 69 74 65 20 6c 6f   ┆sitioned to the current write lo┆
0x1120…1140 63 61 74 69 6f 6e 2e 0a 20 20 20 20 20 54 68 69 73 20 72 6f 75 74 69 6e 65 20 6d 75 73 74 20 62   ┆cation.      This routine must b┆
0x1140…1160 65 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 79 6f 75 20 68 61 76 65 20 63 6f 6d 70 6c 65 74 65 64   ┆e called when you have completed┆
0x1160…1180 20 79 6f 75 72 0a 20 20 20 20 20 77 72 69 74 69 6e 67 20 6f 66 09 64 61 74 61 20 74 6f 09 74 68   ┆ your      writing of data to th┆
0x1180…11a0 65 20 66 75 74 75 72 65 20 73 63 72 65 65 6e 20 69 6d 61 67 65 2c 20 69 6e 20 6f 72 64 65 72 20   ┆e future screen image, in order ┆
0x11a0…11c0 74 6f 20 6d 61 6b 65 0a 20 20 20 20 20 74 68 6f 73 65 20 63 68 61 6e 67 65 73 20 76 69 73 69 62   ┆to make      those changes visib┆
0x11c0…11e0 6c 65 20 74 6f 20 74 68 65 20 75 73 65 72 2e 0a 0a 20 20 20 20 20 5f 08 44 5f 08 70 5f 08 79 5f   ┆le to the user.       _ D_ p_ y_┆
0x11e0…1200 08 77 5f 08 69 5f 08 6e 5f 08 64 5f 08 6f 5f 08 77 20 73 70 65 63 69 66 69 65 73 20 74 68 65 20   ┆ w_ i_ n_ d_ o_ w specifies the ┆
0x1200…1220 72 65 63 74 61 6e 67 6c 65 20 77 68 65 72 65 20 63 68 61 72 61 63 74 65 72 73 09 77 69 6c 6c 20   ┆rectangle where characters will ┆
0x1220…1240 62 65 0a 20 20 20 20 20 70 6c 61 63 65 64 20 69 6e 20 74 68 65 20 66 75 74 75 72 65 20 73 63 72   ┆be      placed in the future scr┆
0x1240…1260 65 65 6e 20 69 6d 61 67 65 2c 09 61 6e 64 20 73 65 74 73 20 74 68 65 20 63 75 72 72 65 6e 74 0a   ┆een image, and sets the current ┆
0x1260…1280 20 20 20 20 20 77 72 69 74 65 20 6c 6f 63 61 74 69 6f 6e 20 74 6f 20 74 68 65 20 74 6f 70 20 6c   ┆     write location to the top l┆
0x1280…12a0 65 66 74 20 63 6f 72 6e 65 72 20 6f 66 20 74 68 65 20 72 65 63 74 61 6e 67 6c 65 2e 20 20 54 68   ┆eft corner of the rectangle.  Th┆
0x12a0…12c0 65 0a 20 20 20 20 20 75 70 70 65 72 20 6c 65 66 74 09 63 6f 72 6e 65 72 20 6f 66 20 74 68 65 20   ┆e      upper left corner of the ┆
0x12c0…12e0 77 69 6e 64 6f 77 20 68 61 73 20 74 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 73 70 65 63 69   ┆window has the coordinates speci┆
0x12e0…1300 2d 0a 20 20 20 20 20 66 69 65 64 20 62 79 20 5f 08 6d 5f 08 69 5f 08 6e 5f 08 72 5f 08 6f 5f 08   ┆-      fied by _ m_ i_ n_ r_ o_ ┆
0x1300…1320 77 20 61 6e 64 09 5f 08 6d 5f 08 69 5f 08 6e 5f 08 63 5f 08 6f 5f 08 6c 2c 09 61 6e 64 20 74 68   ┆w and _ m_ i_ n_ c_ o_ l, and th┆
0x1320…1340 65 09 6c 6f 77 65 72 20 72 69 67 68 74 20 63 6f 72 6e 65 72 20 68 61 73 0a 20 20 20 20 20 74 68   ┆e lower right corner has      th┆
0x1340…1360 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 73 70 65 63 69 66 69 65 64 20 62 79 20 5f 08 6d 5f 08   ┆e coordinates specified by _ m_ ┆
0x1360…1380 61 5f 08 78 5f 08 72 5f 08 6f 5f 08 77 20 61 6e 64 20 5f 08 6d 5f 08 61 5f 08 78 5f 08 63 5f 08   ┆a_ x_ r_ o_ w and _ m_ a_ x_ c_ ┆
0x1380…13a0 6f 5f 08 6c 2e 20 20 54 68 65 73 65 20 63 6f 6f 72 2d 0a 20 20 20 20 20 64 69 6e 61 74 65 73 20   ┆o_ l.  These coor-      dinates ┆
0x13a0…13c0 61 72 65 20 74 68 65 20 61 62 73 6f 6c 75 74 65 20 73 63 72 65 65 6e 20 63 6f 6f 72 64 69 6e 61   ┆are the absolute screen coordina┆
0x13c0…13e0 74 65 73 2c 20 77 68 65 72 65 09 74 68 65 20 75 70 70 65 72 0a 20 20 20 20 20 6c 65 66 74 20 63   ┆tes, where the upper      left c┆
0x13e0…1400 6f 72 6e 65 72 20 6f 66 20 74 68 65 09 73 63 72 65 65 6e 20 69 73 20 72 6f 77 20 30 09 61 6e 64   ┆orner of the screen is row 0 and┆
0x1400…1420 20 63 6f 6c 75 6d 6e 20 30 2e 20 20 4e 65 67 61 74 69 76 65 0a 20 20 20 20 20 6e 75 6d 62 65 72   ┆ column 0.  Negative      number┆
0x1420…1440 73 20 73 70 65 63 69 66 79 20 72 6f 77 20 6f 72 20 63 6f 6c 75 6d 6e 20 6e 75 6d 62 65 72 73 20   ┆s specify row or column numbers ┆
0x1440…1460 66 72 6f 6d 09 74 68 65 20 62 6f 74 74 6f 6d 20 6f 72 0a 20 20 20 20 20 72 69 67 68 74 20 65 64   ┆from the bottom or      right ed┆
0x1460…1480 67 65 73 20 6f 66 20 74 68 65 09 73 63 72 65 65 6e 2e 09 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c   ┆ges of the screen.  For example,┆
0x1480…14a0 0a 09 20 20 64 70 79 77 69 6e 64 6f 77 28 30 2c 20 2d 31 2c 20 30 2c 20 2d 31 29 3b 0a 20 20 20   ┆    dpywindow(0, -1, 0, -1);    ┆
0x14a0…14c0 20 20 64 65 66 69 6e 65 73 20 61 20 77 69 6e 64 6f 77 20 77 68 69 63 68 20 66 69 6c 6c 73 20 74   ┆  defines a window which fills t┆
0x14c0…14e0 68 65 20 77 68 6f 6c 65 20 73 63 72 65 65 6e 2e 20 20 52 65 74 75 72 6e 73 0a 20 20 20 20 20 6e   ┆he whole screen.  Returns      n┆
0x14e0…1500 6f 6e 7a 65 72 6f 20 69 66 09 74 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 09 61 72 65 20 69 6c   ┆onzero if the coordinates are il┆
0x1500…1520 6c 65 67 61 6c 2e 0a 0a 20 20 20 20 20 5f 08 44 5f 08 70 5f 08 79 5f 08 77 5f 08 72 5f 08 69 5f   ┆legal.       _ D_ p_ y_ w_ r_ i_┆
0x1520…1540 08 74 5f 08 65 20 77 72 69 74 65 73 20 5f 08 63 5f 08 6f 5f 08 75 5f 08 6e 5f 08 74 20 63 68 61   ┆ t_ e writes _ c_ o_ u_ n_ t cha┆
0x1540…1560 72 61 63 74 65 72 73 20 66 72 6f 6d 20 6c 6f 63 61 74 69 6f 6e 20 5f 08 62 5f 08 75 5f 08 66 09   ┆racters from location _ b_ u_ f ┆
0x1560…1580 74 6f 20 74 68 65 0a 20 20 20 20 20 66 75 74 75 72 65 20 73 63 72 65 65 6e 20 69 6d 61 67 65 20   ┆to the      future screen image ┆
0x1580…15a0 61 74 20 74 68 65 09 63 75 72 72 65 6e 74 09 77 72 69 74 65 20 6c 6f 63 61 74 69 6f 6e 20 69 6e   ┆at the current write location in┆
0x15a0…15c0 20 74 68 65 0a 20 20 20 20 20 63 75 72 72 65 6e 74 20 77 69 6e 64 6f 77 2c 20 61 6e 64 20 75 70   ┆ the      current window, and up┆
0x15c0…15e0 64 61 74 65 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 77 72 69 74 65 20 6c 6f 63 61 74 69 6f 6e   ┆dates the current write location┆
0x15e0…1600 0a 20 20 20 20 20 61 70 70 72 6f 70 72 69 61 74 65 6c 79 2e 20 20 54 68 69 73 20 63 61 6c 6c 20   ┆      appropriately.  This call ┆
0x1600…1620 64 6f 65 73 20 6e 6f 74 09 64 6f 20 61 6e 79 20 61 63 74 75 61 6c 20 49 2f 4f 20 74 6f 20 74 68   ┆does not do any actual I/O to th┆
0x1620…1640 65 0a 20 20 20 20 20 74 65 72 6d 69 6e 61 6c 2e 09 43 6f 6e 74 72 6f 6c 09 63 68 61 72 61 63 74   ┆e      terminal. Control charact┆
0x1640…1660 65 72 73 20 61 72 65 20 68 61 6e 64 6c 65 64 20 72 65 61 73 6f 6e 61 62 6c 79 2c 20 61 73 20 69   ┆ers are handled reasonably, as i┆
0x1660…1680 73 0a 20 20 20 20 20 72 75 6e 6e 69 6e 67 20 6f 66 66 20 74 68 65 20 65 6e 64 20 6f 66 20 61 20   ┆s      running off the end of a ┆
0x1680…16a0 6c 69 6e 65 20 6f 72 20 74 68 65 20 77 69 6e 64 6f 77 2e 20 20 54 68 69 73 09 72 6f 75 74 69 6e   ┆line or the window.  This routin┆
0x16a0…16c0 65 0a 20 20 20 20 20 69 73 09 63 61 6c 6c 65 64 20 62 79 20 5f 08 64 5f 08 70 5f 08 79 5f 08 63   ┆e      is called by _ d_ p_ y_ c┆
0x16c0…16e0 5f 08 68 5f 08 61 5f 08 72 2c 20 5f 08 64 5f 08 70 5f 08 79 5f 08 73 5f 08 74 5f 08 72 2c 20 61   ┆_ h_ a_ r, _ d_ p_ y_ s_ t_ r, a┆
0x16e0…1700 6e 64 20 5f 08 64 5f 08 70 5f 08 79 5f 08 70 5f 08 72 5f 08 69 5f 08 6e 5f 08 74 5f 08 66 2c 20   ┆nd _ d_ p_ y_ p_ r_ i_ n_ t_ f, ┆
0x1700…1720 61 6e 64 20 69 73 20 74 68 65 72 65 2d 0a 20 20 20 20 20 66 6f 72 65 20 74 68 65 20 6d 6f 73 74   ┆and is there-      fore the most┆
0x1720…1740 20 65 66 66 69 63 69 65 6e 74 20 77 61 79 20 74 6f 20 67 69 76 65 20 63 68 61 72 61 63 74 65 72   ┆ efficient way to give character┆
0x1740…1760 73 20 74 6f 20 5f 08 64 5f 08 70 5f 08 79 2e 0a 20 20 20 20 20 52 65 74 75 72 6e 73 20 6e 6f 6e   ┆s to _ d_ p_ y.      Returns non┆
0x1760…1780 7a 65 72 6f 20 69 66 09 6e 6f 74 20 61 6c 6c 09 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 66   ┆zero if not all the characters f┆
0x1780…17a0 69 74 20 69 6e 20 74 68 65 20 77 69 6e 64 6f 77 2e 0a 0a 20 20 20 20 20 5f 08 44 5f 08 70 5f 08   ┆it in the window.       _ D_ p_ ┆
0x17a0…17c0 79 5f 08 63 5f 08 68 5f 08 61 5f 08 72 20 77 72 69 74 65 73 20 74 68 65 09 73 69 6e 67 6c 65 20   ┆y_ c_ h_ a_ r writes the single ┆
0x17c0…17e0 63 68 61 72 61 63 74 65 72 20 5f 08 63 5f 08 68 20 74 6f 20 74 68 65 20 66 75 74 75 72 65 20 73   ┆character _ c_ h to the future s┆
0x17e0…1800 63 72 65 65 6e 0a 20 20 20 20 20 69 6d 61 67 65 2e 20 20 52 65 74 75 72 6e 73 20 6e 6f 6e 7a 65   ┆creen      image.  Returns nonze┆
0x1800…1820 72 6f 20 69 66 09 74 68 65 20 63 68 61 72 61 63 74 65 72 20 63 6f 75 6c 64 6e 27 74 20 66 69 74   ┆ro if the character couldn't fit┆
0x1820…1840 20 69 6e 20 74 68 65 0a 20 20 20 20 20 77 69 6e 64 6f 77 2e 0a 0a 20 20 20 20 20 5f 08 44 5f 08   ┆ in the      window.       _ D_ ┆
0x1840…1860 70 5f 08 79 5f 08 73 5f 08 74 5f 08 72 20 77 72 69 74 65 73 20 74 68 65 20 6e 75 6c 6c 20 74 65   ┆p_ y_ s_ t_ r writes the null te┆
0x1860…1880 72 6d 69 6e 61 74 65 64 20 73 74 72 69 6e 67 20 5f 08 73 5f 08 74 5f 08 72 20 74 6f 20 74 68 65   ┆rminated string _ s_ t_ r to the┆
0x1880…18a0 20 66 75 74 75 72 65 0a 20 20 20 20 20 73 63 72 65 65 6e 20 69 6d 61 67 65 2e 20 20 52 65 74 75   ┆ future      screen image.  Retu┆
0x18a0…18c0 72 6e 73 20 6e 6f 6e 7a 65 72 6f 20 69 66 20 61 6e 79 20 6f 66 20 74 68 65 20 73 74 72 69 6e 67   ┆rns nonzero if any of the string┆
0x18c0…18e0 20 63 6f 75 6c 64 6e 27 74 0a 20 20 20 20 20 66 69 74 20 69 6e 20 74 68 65 09 77 69 6e 64 6f 77   ┆ couldn't      fit in the window┆
0x18e0…1900 2e 0a 0a 0a 0a 0a 50 72 69 6e 74 65 64 09 33 2f 37 2f 38 35 09 09 20 20 37 20 4d 61 72 63 68 20   ┆.     Printed 3/7/85    7 March ┆
0x1900…1920 31 39 38 35 09 09 09 09 33 0a 0a 0a 0a 0a 0a 0a 44 50 59 28 33 29 09 09 20 20 20 20 55 4e 49 58   ┆1985    3       DPY(3)      UNIX┆
[…truncated at 200 lines…]