Motorola Mobility, Inc. v. Microsoft Corporation

Filing 125

NOTICE by Microsoft Corporation re #124 Defendant's MOTION Claim Construction of Filing Exhibits (Attachments: #1 Appendix (Index to Exhibits), #2 Exhibit 101, #3 Exhibit 102, #4 Exhibit 201, #5 Exhibit 301, #6 Exhibit 302, #7 Exhibit 304, #8 Exhibit 305, #9 Exhibit 501, #10 Exhibit 502, #11 Exhibit 504, #12 Exhibit 601, #13 Exhibit 801 (Part 1), #14 Exhibit 801 (Part 2), #15 Exhibit 901, #16 Exhibit 902, #17 Exhibit 903, #18 Exhibit 904, #19 Exhibit 905, #20 Exhibit 1101, #21 Exhibit 1102, #22 Exhibit 1105, #23 Exhibit 1110, #24 Exhibit 1114, #25 Exhibit 1115, #26 Exhibit 1116, #27 Exhibit 1201, #28 Exhibit 1301, #29 Exhibit 1302, #30 Exhibit 1303, #31 Exhibit 1304, #32 Exhibit 1305, #33 Exhibit 1401, #34 Exhibit 1402, #35 Exhibit 1403, #36 Exhibit 1404, #37 Exhibit 1405, #38 Exhibit 1406, #39 Exhibit 1407, #40 Exhibit 1408, #41 Exhibit 1409)(Miner, Curtis)

Download PDF
Exhibit 801 (Part 1 of 2) 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 14 54 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 14 "10 1471 1472 1473 1474 1475 1476 1477 1478 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 W CO 1479 1480 1481 init window(screen,node,output,title,row,col,out clr,out fi11,out pat,pane c1r) reglster SC~EEN *screen; reqlster MAPNODE *node; CONNECTOR *output' register short row L coi; reglster char *ti~le; reglster char out c1r, out fill, out pat, pane cir; { reqister char *msg ' Int resu i t = NO~ if (node->style == '5' && (screen->colors < 7 I I !screen->bit map)) node->styl~ = lSI; , If (nOde-~outllne} out llnefnode i if (nod~->pa ette node->left = node->palette' if (node->r~slze box I I node->vscroll) node->rlght T~ VcAAR WDi if (node->corner && Inode->palette) node->left t= VCHAR WD~ if (node->menu I I node-~general use) nQde->bottom = VCHAR HT * 2T else If (node->Hscroll) nod~->bottom = VCHAR liT; align wlndow(screen1nQdeT; msg =-Newms g (30 Q O'''jnIt U , "poS=#2S; SlZe= 2S; outl=#5b; ~ane=#2b; rnarg=,4s; scrn='4s: outp='C; \ self""#C; map"'#C 25' name:::#S; 1:" ly" node->row,node->coi,node->h~ig t,n6de->width, out clr,node->outllne,out fIll,out pat,noQe->style,pane clr,node->pane, node->top,node->bottom,node->left,node->rlgQt O,O,screen->height, . , screen->wIdth~out~ut,&node->wlndow,&node->plcture,row,col,node->name) : In It frame(msq noae,tltle,out clr): msg Call (DIRECT,node->wlndow.pla,msg, 0,0) ; result = sErcmp(mS9,"failed ll ) ; Free (msg) ; return(result) : = ~ ~ ~ VI ~ J3 00 w \0 ~ ~ 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 14 92 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 out line(nodel ~egtster MAPNODE *node; ( node->outer = node->outline + node->pane + (node->outline && node->pane) (nQde->heightjlOO + nOde->Wldth/lOO + 2); if (node->tlght) ( node->toQ = node->bottam ~ node->outer; node->left = node->rlght = node->outer+ node->widthj200; ) else { node->top ::: VCHAR HT; node->bottom = node->outer; node->left ~ node->right = VCHAR WD; l if (node->style ~~ 's') ( node->bQttom += 5; node->rlght t= 5; * .... l'..) .... lJ\ VI J3 00 w \0 .... ~ s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 W CD 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 ]525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 s:: en s:: I 1542 1543 1544 1545 1546 o -I 1547 1 1549 0 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo o 1548 init frame(msqhnode,title,out clr) reg1ster MAPNOvE *node; regIster char *rnsg, *title, out clr; ( char *n, *frame bar('i' reglster char scroll clr-"" (4~ 6)tYELLOW, title clr = WHITE; reql!?ter P E IIDR *hdr; statlc shortup arrowr] = (7 0,0,6,7,12 7 9 10,9,10 3,7 3 7 O)~. statJc short down arrowrl = f3,O,3,J,o,1,6'~63£9i3,i2~16115~1~o 1" stat-l-C short l~ft-arrow [ = {6 0 0 7 3 7 3 1 ~ 0 9 I It I I, () / : statlc short rlg~t arrow 1 ;;:; {3bO,j6j~6~j615616ti2~1~~,1,9L063~O ; static long reSize symb lrl = Oxo OU7I8 X7[80/f~O Ox7rS 7r8 OX7f807fc4,OxOOeco 7c,Ox003Co67c,OxOOfcOaOO,oxoo000600}: if (node->title) ( n "" fr9.me bar(mS "top",400,'T',O O,node->title,lOOO D,out elr 0 NO)l draw filled rect tn6oio,nOde->tlti'L1000~NULL(OiOlout clr,o,o,6,6,"a ' ): draw-rect(&n,5,1 1 0 "CLQSEr ll tiele c+r 's , "S") .... Qraw-text (&n, 0,3 *VCAAR WD, tltle, (INAME"7t1 tie eir, 0, NuLL, NULL) ; 1 E (lnode->nonmod) [ hdr = (P E HDR *\ start macro(&n 0 1000 VCRAR HT-2,2~VCHAR WD,IN' "Fil.Lf ll 0'0 "Sa ll ) i draw r~ct\&n,3,OIVCHAR-HT-7A2!VCHAR WD-~{NULL6title cIr, 'S',l,NULL) i draw-fllled re9tI&n,6,J6vCH R HT-14T2*VC IAR W -10, . NULL,Olo,tlt e cIr, ,O,O,O,NULL}; end macro(~n,hdr);~raw- end(&n)1 } lE (node->Vscroll) ( n = frame bar(m,gLllrght",400, 'V',node->paDe-1Anode->pane-l~790, node->rignt-node->Qane-node->outllnet~,out clr,BlAcK,l,NO): draw rect(&o,node->Qane,noae->pane,VCIIAR HT-4, node->rlaht-(noae->pane\-l node ->outline), "SCROLL! Ii scroll clr, lSi , "Sb ll ) ; draw poly(&n,A75 node->panetl g , u~ arrow I. IIOpfll scroll cir 0 0 IS' " 1 liSa")' 0 , 0' , draw po y(&n,9~O,node->Dane~1 " , 8" ' down arrow I "DoWn!" , scroil eir , 0 , 0 I IS' I0 1 "Sa ll ) ,• dC&) " n; d raw_en ~ ~ ~ b U\ 'th o to 00 w \0 ~ ~ 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 )567 1568 1569 1570 1571 1572 1573 s:: en s:: I o -I 0 1 en o1 "'T r 1'1> o o o o o o ..... o 01 -Iloo ..... 1574 1575 1576 1577 1578 1579 1580 1581 1582 15B3 1584 if (node->lIscroll) { n ~ frame bar(msq "bot II 400, 'H' node->pane-l,O, node->bottom-(no~e->panef-(node->outllne)+2, 910,out clr,BLACK,l,NO); draw rect(&n node->pane,node->Qane, node->bottom-noBe->pane-noae->outline 2*VCHAR WD-2,"5CROLL!" scroll clr,'S';1,"5b tl ) , draw polv(&n,node->pan~ 95~, g , left arrow I IILEFT!{' J.. scroll cir " , '5' " 1 "Sa")' 0 0 0 , , draw po+y(~n,node->pane ~90, ll B'd rl(lltr ' "RIGHtl" , scroll - cir " t '51 , ,1 "Sa ) . arrow 0 0 0 , d raw en &n; (node->menu) frame bar(msq "bot II 200,'M' node->pane-l,O, node->bottom-(node->pane~-(node->outllne)+2, lOOO,out clr,8LACK,1,YES); (node->general use) frame oar(msq-lIbot " 200,'G' node->pane-l,O, node->bottom-(node->pane~-(node->outllne)+2, lOOOlout clr,BLACK,l,YES)i (node->pa ette) frame bar(msq "left",200,'p'lO,n o de->pane,lOOOO, node-~left-(node->pane}-{node->outline)-1,out_clr,8LACK,l,YES); (node->res~ze box) n = frame bar(rnsg IIrbox",200,NULL,O 0 0 0 scroll clr,BIcACK,l NO)' draw symbol (&n, 0 1 6,16,16, reSlze symbol I ('RESI ZET lI,scroll cIr, 6, liS II) i draw-end(&n): (node->corner) frame - bar(msg,"lbox",200,NULL,O,O,O,O,out- clr,BLACK,l,YES); ~ l>.J til I } If · If · If · If ( } If Ul 1A o J0 00 w \0 ~ l>.J =" 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 ] 602 1603 1604 1605 1606 1607 1608 1609 1610 1611 J612 1613 1614 cllar *frame bar(msg,keywLsize,type,row,col,height,width,color,fill,thick,end) reglster char *IDSg, *Keyw; , char type, color, ,flll, ~nd; , regIster short row, col, helght, Width, sIze, thick; ( ~ ~ ~ char *n; n = Append triple(msg,keyw,size,NULL); *11++ :;; type; draw filled rect(&Dlrow,COl,heigQttwidth, . NULL,cotor,O,fl 1,0, 'S',O,tfilcK,"a"); lf (end) drawend(&n}; return(nri U\ "vi o set user(narne,buf,size) tv register NAME *narne; regIster long buf, size; ( register char *p; if (p = Find triple(buf,"name",size,NULL,2,NULL)) ( strc1v(name->user,p) : Note l1s1 ned onll, ): Put( LL/~III",Newm~g(128,"u",lIname=:#SIl/P}); ~oo W \D ~ ~ QC s:: en s:: I o -I 0 1 en o1 "'T r 1'1> o o o o o o ..... o 01 -Iloo I\) 1615 16]6 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 }634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo W 1647 1648 1649 1650 ]651 1652 chanqe(screen,map,msg) SCREEN *screen; LIST *mapi NESSAGE -Amsg; { regtster CONNECTOR *window, towner ~ NULL; regtster short *p; register MAPNODE *node; if (window = (CONNECTOR*)Find triple(rnsg->buf,"conn ll ,Insg->size,NULL,8,NULL)) { for (node = rnap->firsti n~de &~ node->window.pid !~ window->pid && node->terrnlnal.pid wlndow->pidi node = node->nxt) ; if (node) if (p =. (short*) Find triple(msg->buf," s ize",Insg->size,none,4,NULL» { . r~slze(~creen,node,*p *(p+I); . ). f (F lnd tr lple (msg->buf I ('actv" I msg->slze, NULL, 0 HULL) && !node->neyer) map->actlve = node; if (owner = . (CONl;lECTOR*) Find triple(msg->buf,"ownr",msg->slze,NULL,O,NULL» 1f ((long)own~r ~= 1) owner == &rnsg->sender; if (owner) { node->owner = *ownerj if (node->terminal.pld) { Forward(OIRECT/node->terminal.pid,msg->buf); msg->buf == NULL; "'" ~ r= tit tit o tv I ) blip window(map->last)i 00 W \0 "'" ~ o 1653 ]654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 l~igl~light (node ma p ) reg1ster MAPNO 6E *node: reglster LIST *map; { if (node && node 1= map->last active) { if (!node->metaphor) { Put (LOCAL "Window" . NewmS4(r;i4 "hlghliqht","bar=fb' tag=#S",'T',"CLOSE!")); if (node-5wlndow,Rld &~ node-~tltie) Put(DIRECT,noCle->WlndQw.pld } Newmsg(128,"highllght",('off; bar=#b; tag=#S",'T',"CLOSE!"))i I-' ~ I-' IJ1 V. If (node->window.~id\ Put(DIRE C'r,naae->window.pid,Newmsg(32,"keys?II,NULL)) ; map->1ast_actlve = node; o N 00 w \0 mov~ mark(rowLcal,picture) teglster shor~ ro~, col; reglster CONNECTOR *plcture: ( Put (DIRECT,picture->pid,Newmsg(32, "mark ll ,"at=#2s",row,c al)}; 1680 I-' s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo -Iloo ld 1681 1682 168) 1684 1685 1686 1687 1688 ]689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 nOD 1701 1702 170) 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 s:: s:: 1716 1717 1718 en 1719 o -I 1721 1722 1723 I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo 01 1720 clip window(node) reglster MAPNODE "'node; { regjster MAPNODE )\t~mp; priO ~ 127, count, *count addr, *n; regIster short )m; char for ( ; node; node ~ node->pre) { m = Newmsg{lOOO "cut" tlinljI==#s#$#A" priQ-- 0 950 NULL); count addr .", (short *j (Flnd trlpletm,l1lnHi u ;O,NULL,O,NULL) + 2) n = count addr + I: count = OT for (temp = node->pre; tempI temp = temp->pre) ( *n++ ~ temp->row; "'n++ ::: temp->col: *n'.+ = temp->out ht; *n++ "" temp->out-wd; count++: lcount addr ~ count: Put(DIRECT,node->wlndow.pid,m) ; ..... w w i Ut 'tA o Jv 00 W } *find window(map,window,row,col) regtster LIST- *m~p' reg+ster WINDOW *WlndOW " reglster short row, co i ; register MAPNODE *node; { for (node = map->first; node; node ~ node->nxt) l .. . query wlndow(wlndow,node->wln d ow/row,co l} ; If (window->area 1= 'N') break; 1. . . Wln d ow->preVIOus ~ Wln d ow->no d e; return(wlndow->node = node); \0 MAP~ODE ~ ... (.H 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo 0) 1759 1760 1761 1762 1763 1764 1765 1766 que~y window(window"conn,row,col) reqister WINDOW *wIndow; CONNECTOR conn; register short row, col; { register char ~p, *reply; if (window->hdr) Free(window->hdr}; window->Hdr = NULL; wlndow->elem row ~ window->elern col = -t.: repl y . = cal l1 DIRECT Cont,l. pid, Newrnsg (64,_ 'w" e" inU!=" 2s" , row, col) , 0,0) ; p ::; FInd tJ;lPlelrep 1Y{"l.nIlI",O,none,l,NULL,; p += 2 *-slzeof short,; ~tndow->area = p++; wlndow->bar = *t 1 +; wlndow->row = * (short *) p)++: wlndow->col = * (short *) p)++; ~ong a11gn(o); . If l*(short~)p) { window->l).dr:= (P E HDR *l Alloc(*(short*}p,YES); rnemcPy(wlndow->hdr,p,*(snort*)p)i Pree(reply); MAPNODE *new node(map,narne) register LIST *map; reglster char *name; { regi.ster MAPNODE 'Anode = NULL; reglster short ii for (i = POOL SIZE, node = rnap->pool; node->pool && i; ++node, --i) If (.I) . node = (MAP~ODE *) Alloc(sl.zeof(MAPNODE),YES); memset(node,O,slzeof(MAPNODE)) ; nOde->rOOl = 1; strcpy node->name,name); return node); /-01 ~ !II lit Vt o tv 00 !..N \0 /-01 ~ C'\ 1767 1768 1769 1770 1771 177 2 1'773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 17B6 1787 1788 )789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 180) 1804 1805 1806 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo ...... 1807 1808 1809 1810 1811 1812 1813 1814 1815 fre~ node(node) *node; regIster MAPNoDE ( if (node->pool) node->pool "" NULL: else Free(node) ; map after(node~pred,map) regtster MAPNOuE *noas, *pred; reglster LIST *rnap; { if (pred) ( node~>nxt = pred->nxt; node->pre ; pred; if (pred->nxtl lpred->nxtl->pre ~ node; pred->nxt ; noae; } else { if (node->nxt = map->firstl (map->firstl->pre ~ noae; node->pre ~ NULL: ) 1 f (I node->pre) map->first = node; if (! node->nxt) map->last = node; ++map->count; '"'" t.H -...l til 'tll o N 00 W \C) unmGlP(node map) teg~ster MApNODE Anode; regIster LIST Amapi ( . if (node->pre) (node->pre)->nxt ~ node->nxt; else rnap->first ~ node->nxt; if (noBe->nxt) (node->nxt)->pre ~ node->prei else map->1ast = node->pre; --map->count; 't.H" "' QC 1816 1817 18]8 1819 1820 1821 1822 1823 1824 1825 1826 ]827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 rem~p(window node new oiQture,rnap,sell regIster CON~ECTOh -~wlndow, *new picture; reglster MAPNODE *node; reqlster SELECTION *se1; LIST *map; { if (window) for (node = map->firstj node && wlndow->pld 1= node->window.pid; node = node->nxt) if (node) ( ~nd edit(node, 'x' O/O,NU~L); If lDewpicture new plcture->pid 1= node->picture.pid) If thode == sel->rnap) { sel->rnap = NULL: sel->pehding ~ NO; node1>picture ~ *new_picture; ~ f.I,;I I,C && VI U. o 00 w N \D ~ ,J::.. s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo co == 1830 1839 ]940 IBH 1842 1843 ]844 1845 1846 1847 I B4 8 1849 1850 1851 1852 1853 1854 1855 1856 align window(screen,node) teglster SCREEN *screen; regIster MAPNODE *node; ( register short temp; if (screen->char align) { if (node->ti~ht) ( temp:;;;; «node->row % VCHAR IIT) It node->outer node->row = (node->row / VCHA~ H') * VCHAR HT temp ~ «(node->col , VCHAR WD)-I node->outer node->col = (node->col I VCHAR W ).* VCHAR WD (node->outer + node->wldth/200r + { } If if if if if { 1860 1861 1862 1863 1864 1865 1866 1867 1868 }869 1870 1871 1872 I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 -Iloo CD 1875 1876 1877 187B - node-50uter + tempi ? VCHAR_WD : O)i tempi } 1859 s:: en s:: ? VCHAR lIT : 0); else 1857 1858 1873 1874 '""" '""" ,j:;o. ) node->row = «node->row + VCHAR HT-I) I VCHAR ]['1'j * VCHAR lIT; node->col'" ((node->col + VCHAR-WD-l) '/ VCHARWD * VCHAR-WDi - (node->row < screen->meta row) node->row += (screen->meta row + VCHAR_It'r-l) / VCHAR_liT * VCHAR lIT i (node->col < screen->meta col) node->col += (screen->meta col + VClIAR WD-l) / VCHAR WD * VCIIAR WDi (node->out ht > screen->meta ht) node->helght = screen->llIeta-ht - (node->top -I- node->bottom) ; (node->0t.tt wd > screen->meta-wd) node->wl~th = screen->meta wd - (node->left + node->right) 1 (!node->tlght) temp = (node->height % VI;HAR liT ? VCHAR liT : 0)' node->height = (node->helght1VCHAR BTl "1r VCHAR {IT + temp; temp = (nOde->wldth % YCHAR WD ? VCIlAR WD : O)-r node->wldth = (node->Wldth/VCHAR_WD) *-VCHAR WD + temp; ) node->out ht node-)out--wd = node->hl;!iqht ++node->left node->top = node->Wldth + node->bQttom; + llode->rlght; 1Il Ut o J0 00 W 'D ',j:;o. """ l~ s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 o 1879 ]880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 190B 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 S.tatus(msg size) reg+ster cnar *~sg; regIster long SIze; { register char *rn; *(m = Allo~(size,YES») = NUL~; , strcat m,Flnd trlple(msg,"orlg",slZe,none,l,NULL}); 5 trca t m TI II) ~ strcat m~ Fil;}(]' triple (msg, "stat" , size, none, 1, NULL) ) ; strcat m " In-")' strcat m~Find triple(msg,"req ",size,none,l,NULL»; Note(m IIJ:;RROR"); Free(mJ i ~ .a;:. toll reply status(req,roid,stat,code) reg+ster char *req, *rn~d, *stat; regIster long *code; ( register char *type, *msg; type = "failed'" It (!mid) , tyge = "status'" else +1 l*rnid == ,_I) mld+-f.· , else If (*mld == '+') { tyge = "done'!; } lJ1 "vt o J0 00 UJ \0 mlcl++ ; rnsg = N~wmjq(strlen(stat)+10i tyne, "nrlg= S· stat=nS' code= 111 "console" stat code)' if ( m I d ) ' , , " , ( Append triple(rnsg,lIreq ",strlen(rnid)+l,rnid); Reply(req,msg) ; J else ~ Put (DIRECT, (long)req,rnsg); info(dialogue,string,window) dlalogue, wlndow; reglster char *strlng; ( Put (DIRECT.I. dialogue Lpid, NfilW1D?,Q (strl/i!n (strl'ng) +100 ( II info", "text=IIS; near=jfC; walt=nS",stnng,&w ndow,5)}; CON~ECTOR ~ y 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3~ 35 36 37 313 39 40 41 42 4J 44 45 46 41 s:: en , s:: 0 -I 0 1 en 0 "'T1 r I:t:- 0 0 0 0 0 0 ..... 0 01 01 ..... 48 49 50 51 52 5] 5~ 55 56 57 58 59 60 Module Date submitted AuthQr OngIn Description %M% %1% %E% %U% Frank Kolnick cX Picture Nanager ***~************************************************** ************1 #irllQef lint statIc char Srcld(] ~el1dlf 1* Picttifi'manager: 'I include Illclude Include = "%z% %M%:%I%"; global dat~ ~ ,f:.. r.I'I 'I I' cX definitions *L '/* picture, etc. definitions *1 <cX.h> <111.11> . <memQ:ty.h> Illc,Jude <strIng.l!> statId long none = 0; typedef struct element node 1* links picture elements: *1 { ->next n«de *1 struct element node *nxt; ->precedlnq node *1 ~: strvct elepent-node *pre; 'element bas chanqed' AI tmslgned char cf1anged~ 'element 15 markea' *1 ~: t1lls1gned char markedt 'no longer in use' *1 ullsl,gned char deletea; 'local Duffer pool' *1 ~: unsIqlled cllar pooli (start of element) *1 shore lengeh; '/* 1***** lfO'l'E: 'length' must start all a long-word boundary '****1 ELENENT; lypedef struct current state ( *msq; char. s~nder~ CONNECTOR SIze; long appl; long appl row, appl col; short owner: CONNECTOR *marki char 'old mark; char ,Iqi!rase mark' char dl!ilplay mark: unslgned char pnvateT \lnS 19ned char check; ullslgned char dr;>buqj unsIgned char char char chor long char CUHHENT~ hlghllqht; J2!' n 9 me 64 , file stat b 'oelej s *status_s trlllS1; '"0 ::u 0 §ci ~ t.I\ r-' 1A H 0 tv (fl >-'l H 00 Z W \0 G') to 1* current data: *1 ;! ~: ~: ~: ~: ~z ~: ~: ~: -)current msg. *1 cQnn. to msg. sender 'III SIze of msg. *1 relevant appliC9t~on */ appllcatioh 'origin' *1 conn. to owning proe. *1 current mark element *1 copy of previous mark */ Tl~ment to erase mark *1 dl~play mqrk' */. 'prlvate pIcture' *1 'ch~ck sl~e' *1 'prInt dl?gno~tic~' */ type of hIghlightIng *1 Plcture's name AI pIcture file's name *1 current status •.. *1 . ,. */ ... =" ~ 61 62 63 61 65 66 67 63 69 70 71 72 73 7<1 75 76 77 78 79 80 81 82 83 84 85 86 87 BB 89 90 91 92 93 94 95 96 97 98 99 100 ]01 102 10J s:: en s:: I I 0 -I 0 en 0 "'T1 r I:t:- 0 0 0 0 0 0 ..... 0 01 01 I\) 104 105 JOG 107 100 109 )10 111 1.12 113 114 115 116 typedef struct view node I struct view node *nxt; CONNECTOR owner; short row, col; short height, width: 1* links viewports: *1 typedef struct appl node I struct appl node *nxti lon~ name: CONfECTOR conn; short row, col: 1* links applications: */ ->next node *1 name of appli9atiQn */ ~: cOQn, to applIcatIon *1 typedef struct anim node ( struct aoim node *nxt; lon~ name; CON ECTOR conn; 1* links _animation processes: */ ->next node *1 name of element */ ~: conn. to process *1 /* typedef struct affected area l short rl, e1; short r2 e2; char co 1or; char pattern; short max h~i~hti short ~alCv-lld hi short leight, Width; AHEA: typedef struct lists ( *first; ELEr1EHT *last; ELE~1EIIT *C\1rrent; ELEI1ENT *VIews; VIEW *applsj APPJ. *anlms; AIHH changes; 111t erases; ~Ilt SIze; lilt struct ( 11' long size; lon~ *ptr; ELm ENT pool; 1* area changed VIEI-l; APPL; AlUM; ) LIST: ~: ~: ~: ~: ~: ~: 1* ->next nod~ */ owner of viewport */ start of v ewport *1 extent *1 ~ ,j::o. ~ orIgIn */ by a request: */ lJI upper l~ft front *1 lower rIght back */ background color *1 backgr01.,lIld pattern */ max. hfi!l~ht *1 max. Wid h */ current size *1 Ut 0 "tV 00 w \0 1* list pointers, etc.: *1 ~: ~: ~: ~: ~: ~~ 1* ->pict. element list */ ->end of p.e. list *1 ->l~st p.e. yhan~ed */ ->Vlew~ort lIst .1 ->appl c~tion~ lIst *1 ->anImat191l llst *1 IChanges 1n 11~t *1 erasures in llst *! £Icture elements *1 e ement pool deser.! *1 hlements *1 SIze of elements *1 ->elernent buffer *1 ~ ,j;:" 00 J17 ] 18 119 )20 121 122 123 124 )25 126 ]2"1 128 ]29 130 ]31 )]2 133 ]34 135 136 137 138 ])9 140 1* 113 144 115 146 147 148 149 150 ) 51 )52 15) ] 54 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 W J55 156 157 )58 159 *1 *value(), "'tarO i *rn'ilrk number{ I "'mark area() J chill:' ELEHF:11T l' E IIDR *flrst_macro(, *next=macro(; lie Picture manager: "'mark e.lements(), *new_elcment(); - main-line 'hI PROCESS (Picture) ( CURRENT cur; AREA a~ea; LIST 11~t; reglster VIEW *Vl~W; regIster ANIM "'an1m; $et event key("Picturfi'l ~qr. ") ; Inlt P~(&cur,'area &llst) draw~Plcturel~cur,'area,&llst); . for lVlew; lst,vlews; view; VIew = view->nxt) PlI t (DIRECT t VIew;>owner, pld t N~wrnsg (3? I "unmap" , NULL) ) ; for (aolm ~ 11st.~nIms; ani" anlm = anlm->nxt) . Put (IJIHEcrr I aJllhl->conn. p1d, Newmsg (32, "quit" I NULL) ) ; ',j;;o,. """ ~ 'f Ex 1 t () 141 )42 local functions V\ lh o j N 00 ini~ PH(cuL{area,llst) reglster CU~REHT *cur; regtster ~REA *area; reglster LIST *llst; { area->color = BLACK; area->paltern ~ 0; *cur->name m *cur->file = NULL; area->max height = area->max wl~th = 0; 11 st ->cyrrent = list->first ~ llst->last = NULL; 11 st ->vlew5 "" HULL; ] I st->ap!;lls ~ IHlLI.: ] 1st->al1lms == NULl.; llst->size = list->pool.n == 0; HO; cur->debug = cur->check ~ cur->pnvate "" cllr->cl1splay- mark = == cur->erase_mark == NULL; cur->mark = cur->old mark I • w \D 'til """ = ]60 161 ]62 16) 164 165 ]66 167 168 169 170 171 172 ]73 174 175 176 177 178 179 180 181 ]82 183 184 185 186 187 }88 ]89 190 191 ]92 193 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 -Iloo 194 195 196 ]97 198 199 200 ?Ol 202 203 draw nicture(currarea,list) GURBENT *cur: regtster AREA *area; regLster LIST *llst; { register char ""msgi transaction = 0, result == 0, go = YES; reglster short *element· register ELEMENT statu5[li], list size = 0, *req ~ NULL; long while (go) ( 9 ur ->msg = msg = Get(O,&cur->sender,&cur->size); If (!transactIon) ( list->changes = list->erases ~ area->r2 ~ area->c2 ~ 0; area->rl ~ area->cl = 32767; 9ur->~ppl = NULLt If (llst->appls) , check appl(cur,llst->appls); ) If (*rnsq == 'f' && tr~nsaction < 10) status(++transactlon) = 0; else If (*msg ~= 'l') --transactIon; else . qo = Requ~st(cur/area,list,msg,cur->size,cur->appl); If (!transaction) ( if (list->chrtnges) notlfy(cur,area,ll~t) , for (element = 11st->flrs~; element; element = element->nxt) { ~lernent->chanqed = element->marked = NO; If (element->aeleted,&& IAny msg(NULL)) delete- element(llst,element}; } . if (Find triple(rnsg,"rplY",cur->size,No,OlNULL) && result >== o} reply status (msg, msg I "completed '1 , resu t) ~ tree_requests(rnsg,cur->size,&req,&list_size) ; f ~ !.II ~ l.Jl - 'tit o tv 00 tJ.l \0 ~ i!l 204 205 206 207 208 209 210 211 2)2 cheyk appl(cur app1) regjster CORRE~T tcur1' regIster APPL Aapp ; ( for ( ; appl && (appl->conn.pld If (aprl) ( 227 228 229 230 231 232 233 234 2J5 236 237 238 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 01 ~ ~ fre~ requests(msg,size,req,list size) reqp;ter char *qlSg, Breg: ,reglster long slze, 'lISE Slze; ( register char *temp, *next; if (msg) ( *(char**)msg == *req; * r~q == s Tsg; += SJze; , *llst ze if (fnny msg(NULL) I I *list size> 10QO) for 1temp ::= *req, *req ~ NULL, *llst size next ::= * (Ghar*"") temp; Free(temp) ; Ul "ut o N 00 w 1.0 = 0; temp; temp ::= next) ~ 1Il 239 240 241 242 Reqvest(cur~area,list,msg,size,appl) 244 ( 243 ~ appl->name)) cur->app1 "" -1; cllr->appl row:::: app]->rowi cur->appl=cQl = appl->col; 214 215 219 220 221 222 223 224 225 226 cur->sender.pid): appl = appl->nxt); !.It if (! (cur->appl 213 216 217 2]8 !~ rcglster CU!cRENT reQlster AREA req1 s ter LIST reglster long *cur; *area; *list; msg, size, applJ ~ 248 249 go ~ YES; if (!strcmp(msg," wrlte")) Draw(11st,rnsg,slZe) . else 1f (1 strcmp(msg, "edlt"» 251 else If llstrcmp(msg,"mark" ) 253 else 1-f Ilstrcmp(ID!?g,nilltll) Iqt( tst/msg,slze~applll 245 246 247 250 252 254 255 256 257 258 259 260 261 262 263 264 265 266 267 260 269 270 271 272 273 274 275 276 2'77 278 279 280 281 282 283 284 s:: en , s:: o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 0) 285 286 287 288 289 290 291 292 293 re~i~~er shorl . E~lt text(cu~,area'llst!mSg'SlZe,appl); MQve mark(cur,area lIst; else If { strcm!;) (msg, 'move '} ) MQve area,llst,ms~,slzeflappl); . else If !strcmp(msg, era~e')} Eraserarea,l1st,IDsg,slze,uppl) : else 1f {.strcmp(msg,tlreadll)J CQQY cur,area,llst,mSg,Slze(appl); else If !strcmp(mf?g "replaQe")} R~Qlace(area,lls~flmsg,sl~e,appl) ; else 1I (! strcmp!lJIsq, 'change")} C~ange{area, lst,msg,slzB,Sppl); else If {!strcrnp!IJISgj"anlmate l } } Anlmate(cur, 1St • else if (lstrcmp(msg, "alter") II Istrcmp(ms9, "cancelli») Alterfcur,llst); else 1f (.strcrnPJJn$gL"nUrnberll» Qver number llse msg slze,appl); else .If t"!s trclI1p lIls9 ('mark?") ) Qvery mark(c r), else If (t~trcmp{msg'''~avell» S9ve PIcture cur,l1st~· else 1f strcmp msg, "s'?t 'f) s~t mark(cur,area llst); else 1 f- ( I s trcmp msg, (, restore") ) R~store ~ark cur,area 11st); else If (!strcmp msg "bkgd ll ») D9 ckground(area,iist,msg,size) ; else lf l!strcJ)'lp(msgl"create')l 99 = New plcture(cvr,area, 1st}: else If (!strcmp(msg,"lnlt"»), . cvr->private = go ~ New I1cture(cur,area,llst); else If (1strcIJ1P(msg "open':r 99 = Old plcture(cur,lh s )1 else 1f {!strcIJlP(msg'''apPl I»~ J\I? 1 ur,llst); else 1~ Tstrcmp(msg,"qult ll » { if (qo ~ (cu~->sender.pid !~ cur->owner.uid» feply status(msg,msg,"not authorized ',O} ; } - ~ til til I.J\ "ut o to 00 w I -n \CI l l ~ til ~ 294 295 296 297 290 299 300 301 302 303 304 305 306 307 308 309 310 else if (!strcmp(msg,tlquery")} Ql,lery(cur,llst) ; else If t fstrcmp[msg, "failed"» S~atus(msg,slZe) ; else 1f: (!strcmp(msg,"done") II !strcmp(msg,"status ll » else; if(! change attribute (list,rnsg, s.1 ze, appl» ( If (!~trcmp(msgiliviewlill ~ !.J1 ...... VtewgQrt(cur,area Ist)~ else If {Istrcmp(msg,fidebug') cur->debug = !cur->debug; else reply status(msg,"-\'unknown\''',msg,O); ) returll(go) : Ul. Ul. o LV 00 W \0 ~ IJI 00 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 ...... 311 3J2 313 314 315 3]6 317 318 319 320 321 322 323 321\ 325 326 327 328 ]29 330 3)1 332 3)3 331\ 335 3JG 337 JJ8 JJ9 340 341 342 30 344 315 ]46 34 'J s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 CO 348 349 350 351 352 35J 354 355 356 eha r~ge a ttri btl te (li!? t L msg, 81 ze, appl) reg 1 s ter 1,rS'1' *llsq reg.Lster long ( static char I rnsg, SIze, appl; msgids[] =: "select\Oblink\oinvert\Ohide\Ohighlight\O"; reglster char 'p: reg~ster sbort new state, changed, type; regIster ELEMENT *element; regIster P E !lIJR *hdr; for fD a msgids, type = 0: *p && strcrnp(rnsg,p); p += strlen(p)+l, ++type); 1 [ (. ~p) return(HO) : list->current = element = rn~rk elernentS(list,NuLL6NuI~~msg,size,appl); new state::::: !(short)Find trlPle(msg,"off ",slze,1t ,0;UuLL/; 10r-( : element; element"·: elernent->J1xt) ]f (element->rnarked) { bdr "'" (P E I1DR *) &element->length; sWItch (type) { 9hanged = hdr->attr.selected I I new state; case 0: lf (hJr->attr.selected ~ new ~tate)­ Ptlt(NEXTLtlconsole"~Niwmsq(hdL->lenqth+50, "wrlc:e" ' Itdata'" e e' tYI)e""lI c " , hdr / HULL , 'Pi)). ,,, , b rea k ; . chanqed === hdt"->attr.blink !"'" new state: case 1: hdr-5attr.bllnk === new state; break; chanqed = bdr->attr.invert 1= new state: case 2: hdr-5at tr. UlVert = new sta te; break; chanqed == 11c,Ir->attr.hidden != new state; case 3: hdr-5attr. lldden = oe\>1 state; break; . challged = h<Ir->Glttr.higllllght != new state; case 4: hdr->attr.lnghllght = new_state; J If (element->chanqed ::= changed) 1Ist->cl1anqes++' elernent->rnarked : : : 116; } return (YES) ; .... til ~ VI v. ~8 00 w \Cl .... = Q\ J5'l 358 359 360 361 362 JG) 364 365 366 367 368 369 370 371 372 373 374 375 3'16 377 )78 ]79 380 301 ]82 38) 38~ ]85 3UG 387 Qllery (cur, List) CUR~E~T ) 396 391 s:: en , s:: o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 01 CD J90 399 400 401 402 40) 404 405 406 407 408 - - ..... =-. ..... U1 Vt - else pi y h t = tJ i c wd,:-: ma}{ r "" ma ~ c for (VieW ~ list=>Vlews; VIew; VIew RcpJv(cur->msq" 1 = 11\ n r o ~N 00 == mill C =;= 0; Vlew->nxt, nVlews++); . N~WmSg(256,ltstgtlls",ltortq;:,#s; ,size==1l2Si !ow""#2s; high=~2s; cnt=#s; \ vle\.J= 5; ,naJllC=#9; fll~==nSIl,"plcturel\, p.1C h ,PIC \>Jd,Ulll) r(mlll_C,max r,max_c,n elem,l1 views, cur=>name,cur->fIleJ); -- 388 ]89 390 ]91 392 39] 394 395 *c~r' regIster LIST *llSf; l 'd n elem BOn vi~ws ~ 0; uI1s1gne min r ~ 65~357 mIn c = 65535; , reglster unsigned max-r = 0, max c =-0, pic ht = 0, pIC wd = 0; reg~ster unslqned *el~ment; regjsler ELEMENT reglster P E IIDR *h~r: *Vlew; regIster VIEW for (element = list->first; element: element = element->nxt) ( hdr = (P E IIDR *l &elemr;:nt->lenqth; if Ihdr-:->row < nlln-c l]lln--c == har->row; mpl r) mlll r = 1f hdr->col < hdr->col: ~ f hdr->row + hdr=> Wlqht > max r) max r ~ hdr->row + hdr->llei(Jht; If hdr->col + hdr->Wldeh > max c) max c := hdr->col + hdr->widtl1; n e emH·; } If (n elem) { pte ht ~ max r - min r; plc-wd = max'-c - mln'c; query ~ w \0 number'111ist,ms~1~iz~,appl) 1'ee1l ster I,IS 1st, register long msg, size, app1; { regjster unsigned n = 0; regIster ELEMENT *element, *temp; if (element = mark elements(list,NULL,NULL,msg,size,appl)) ( for (temp ~ li;t->first; temp != element: temp ~ temp->Ilxt, ni+); Hepl y (111sq, N~wmsglelemel1L -> 1ength+3 2,1' number" , "num"'ns; e em=#e",Il,&element->length)); } else reply_status (IIISg, "-number", "too high",O); ..... =-. N 409 4)0 411 4] 2 413 414 415 416 417 4 18 419 420 121 422 423 424 425 426 427 428 429 430 431 4)2 4)3 4)4 435 436 437 438 419 440 441 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 0) o 442 443 444 445 446 447 44B 449 450 451 452 453 454 455 456 457 Dra~(list mSq,Sizel reg1steJ: LIS'!' '" 1st; reglster long msg, size; ( . register ELEMENT' lafter; reglster long "'p: if (p = (long *) rind triple(lllsg,"data",s1ze,UULL,4,NULL» ( if (Find tripleLmsg,"back",size,No,O,NULL)) after::: NUL ; else after = list->lasti if (!draw elements(p,*(p-1),list,after)} reply~sta tus (msg, "-Wrl te" , IIbad length/type/macro II, 0) } else reply_status(msg, II-write" ,1I)l1issing \ 'data\ 111,0); elements(p,list len,list,after) *p: regIster long ll~t len; regtster LIST *IIst; regIster ELEMENT *after; ( register ELEMENT "'element; reglster short length, number while (leng~h ~ * (short *) Pj && (llst len -'" length '>= 0 ..... =-. CN ; dra~ VI reglster char && { if Vt o p 00 UJ 1.0 :=; 0; F>trchr("tlreacdslI1n", (P--- E- !IDR*)p)->type)) «( (P E HDR"')p) ->type ,.,,'" 'm' && !check lllacro(p») element ='new element(llstllength+sizeOf(ELEMENT) ,after); ~emCPYi&element->lengt~'f)f ength) I If (1 ( P E IIDH*)Pl->helg) .) de lne-bo}{(~e ement->lcngth); number+'I-; p += 1er.lgth; Long allgn{p) ; Ijst->si;e +m number! 11 st->changes += llu)l1ber; llst->current = elementreturn (length? NO : YEE;j; Dreak~ ..... =-. ,f;:o. 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 47) 474 475 476 477 478 479 400 481 482 403 484 485 486 487 488 489 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 0) ..... 490 491 492 deflne box(hdrl reglster P--- E--- llDR ( *hclr; ~ register char *val: val = vallle(hdr) ; l[ (hdr.->type == ~ til 't') ( hdr->hr;ight = VClIAR Il'l'i lldr->wldth = VCJlAH ND -I< strlen(val+8) ; ) else if ((hdr->type In') II (hdr->type == 'm')) =;;::; U\ che<,~k "ut o nlacrO (hdrl 10 regIster P- r~ ._- fIOn { *hdr; register P E lIDR *temp, *firstj short - --. len; char *p mClcro__ type; 00 W \0 f for (first =' temp"'" first macro(hc1r,&macro type,&len,&p); temp = next_macro (&len I &p) ) - temp: if (macro type == IL') temp--;S:'attr.hidden = YES; if (ftef)1p->helgl1t) defllle_box(temp) ; If (m~cro type =~, '1') tlt-st=>attr.hlddell =: NO; return (p ? YES : NO); } ~ '" '" 493 494 495 496 497 4~) 8 499 500 501 502 50J 504 505 506 507 508 509 510 511 512 513 514 51.5 5]6 51'7 518 519 520 521 522 523 524 525 526 527 528 s:: en , s:: o -I ,0 en o "'T1 r ,:t:o o o o o o ..... o 01 0) I\) 529 530 531 532 533 534 535 P E 1I0R *first macro(hdr,type,len,p) reglster P E IIOH .,\hdr; reglster char *type; reglster short *Ieh; reg lster char .up; ( register P E lIDn. . t -Ie elOp; ""p = va111e(hdr) i ir (type) ""type::::: **p; ~ =" ~ (Ap)+-I·· LOllg aiiqn(-A-nl1. temp-:=< (P E IDl-< *l *p; ""len = hdr-~lenqth - (*p - (char *) hdr}' if (ternp->lengtFl && temp->1ength < *len ~& strchr("tlreacdsmn",temp->type)) re turn ( temp) ; *P "" NULIJ' return umf.q ; VI "ut J~ "'next rnacro(len,p) regjster short *len; regIster char up: l . t-er P_E_IIDR regIS *temp; P E 1I0R 00 W 10 if (*1') ( temp == (P E BOR *) *P; *p t= t~lt1p-~length; Long all1n(*P); *1el1---= *p - (chCl.r *) temp)' t_emp == ( E IIDn *) *Pi If (tellll?-~lellgth) If (tel1lP->length < A1en && strchr("tlreacdsmn",temp->type)) return(temp); else *p "" NULL: } return (HUL,L) r ~ =" 00 536 537 538 539 540 511 542 50 544 545 546 50 548 549 550 551 552 553 554 555 556 557 558 559 560 561 %2 56] 56iJ 565 566 567 568 569 5.,0 571 572 573 !J74 5'75 576 s:: s:: en I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 0) W 577 570 579 580 581 5132 5133 584 585 Hep,l ace (area, 1 is t, 1115g , size, appl) AR~A 'area; IJIST "'l1sti. reglster long msg, SIze, appI; l reqjster char "'Pi regIster short length = 0; regIster ELEMENT *temp, reglster r E HDR *bdr, Atemp hdr = NULL; regIster long lIst len; ELEMENT *after = NULL: j f (Find triple (msg I "~\O\O\O\O" , size, NO, 0, NULL) ) ( . Erase(are?, I' t ,msg,slze/appI) i IS If ( after c ~ ~ llst->current; (p = Find triple(msg,"data",slze,HULL,l,lIULL)) li~t len = * ( lonet *) (p-4 \ ) ; willIe «length"" *(short ~) p) && (list len -= length) > 0) ( hdr '=' (P E 1I0I< *) p'1 if (hdr--.:>type == '111 && 1check macro (hdr) ) break; . ~ for (temp = llst->last; temp && ((P E IIDR*)&temp->Jength)->row I"" hdr->row && • ( (lr-E-mm*) & temp-> leng th} ->col • = hclr->col: temp temp->pre) ; ]f (temp] ( lit VI o tv 00 W 1.0 ~ temp hdr = (P E IIOB *) &temp->length; temp=>deleted'-'::::~YES after = temp->pre; ; Jraw(temp hdr ~& ((ldr-5type 1= t: I hdr->height!= elements(hdr lenqth,list,afterl; If I { } I I hdr->wldth 1= teJllp hdr->wldth) change area (area, temp hdr->l"Oy,', temp hdr->col ( , temp hdr--.:>helght, temp htlr->\-ridth); llst->erasesff' , += lengtl); Long_align(p) : P ) If (lcllqth) reply status(msg,"-replace","bad length/type/macro",O); temp hdr->height ~ ...,J o 586 58"} 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 G03 604 605 606 60"} 608 609 610 6)1 612 6)] 611 6]5 6lG 617 618 619 620 621 622 623 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 0) -Iloo 624 62S 626 627 628 629 630 631 632 Erase(area,list,~sg,size,appl) AREA *area: regjster LIST *llst;. reglster long lnsg, sloze, appl; { register ELEMENT *element ~ NULL; reqlster P E llDR *hdr; inE - number; if (element = ~ark elements(list,NuLL,&number,msg,size,appl)) ( list->current = element->pre' for ( ; element; element = eiement->nxt) If (element->marked) { element->deleted = YES; hdr "" (P E HDR*) &elelTll?nt-> lenqth· change area:(area r hdr->row,hdr-:>col,hdr->height,hdr->wictth): J Jlst->erases += number: llst->changes += number; ~ ....:t ~ VI "vi o to 00 copy(cur,area,list,msg,size,appl) CUR~ENT *cur; regt sler AREA *area; regIster LIST *llst; regIster long lnsg, size, appl; { register ELEMENT *element; regIster short bkgd, *p; short *g; unsIgned illt length::: 0; if (bJcgd = (short) Find triple(msg,"bkgd",size,NO,O,HULL)) ( p "" (short *) F1nd tdple(ll1sg,l1@pos",sjze,&none,O,lItJLIJ); q = (short *) Fllld·-tnple(lus g ,"@end ll SlZe,&llOne,O,NULL); change area(area, *p, 'Ie (p+l), "'g-*p, '" (g--I) -"II (pU)); f I 1 f (( element =: mark elements (1 ist & len Q th NUL1I 1 msq r size, appl) ) II bkgd} send(cur,area,list,o,length,e 1ement,H 6 ,NO,okga,; else ReplY(ll1sg,Hewlllsg(64,"write",NULL)) ; W \0 ~ ~ 633 634 635 636 63"7 6)0 639 640 641 642 643 614 645 646 60 648 649 650 651 652 65J 654 655 656 G5"J 658 659 6GO 661 662 663 664 665 666 667 668 669 670 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 0) 01 671 672 673 674 675 676 677 678 Move(area,list,msg,size,appl) lIHEA "'area; LlS'£ *llstj, long msg, slze, appl; ( rogister ELEMENT *element; reglster \' E IIDR *hdr; reglster lntdelta row, delta col, by offset ~ NO, row e:: 0, col = Oi reqlster char *p; lnt n; if (p = Find triple(ms9,"by ",size,NUIJI..,4,1IULL)) ( by offset·= YESi delta row = ~((short *) p)++; delta=col = *(short *) Pi ~lse if (p = Find triple(msg,ttto ",size,NULL,4,NlJJ.L)) ( row = *((short *) p}++; col ::=: *(short *) p; ~[ (list->current := element = mark elements(list,NULL,&n,msg,slze,appl)) { if (!by offset) l hdr :::: (P E IJDR 'II) &element->length; delta row ~ row - hdr->row; delta-col = col - hdr->col; lor ( ; e]-ement; element::: element->nxt) ]f (element->marked) { hdr = (P E rlOR *) &element->length; , chanqe area(area,hdr->row,hdr->col,hdr->height,hdr->Wldth); hdr-5rOw += delta row~ hdr->col +:= delta-col' element->changed ~ YES; element->marked = NO; element->deleted = (hdr->row < 0 I I hdr->col < 0); ]jst!>changes +~ n; llst->e.rases +"'" 11; ....... """" f..I,) lit 'til o J-.:l 00 W 1.0 ....... """" -I:>. 679 680 681 682 683 684 685 686 687 688 6B9 690 691 692 693 694 695 696 697 69B 699 700 701 702 70) 704 705 706 707 ChaQge(area~list,msg,size,appl) reglster AR~A *area; reglster I,IST *llst; regIster long meg, size, appl: ( register ELEMENT *element = NULL; regIster P E llDR *hdr; char - *calor, *bkgd, *fill, *pat; color =- find triple(msg "colTi" ,~ize NUI,L 1 NUI,l,): b~gd ::: Flnd tq.ple(msg, ('bk,gd' ,slze,imI,IJ, 1, NULL) i ful == fInd-trIple (meg "fIll" Iliilze NUIJL 1 NUL,I,) i J;1at = Flnd trlple(msg "pat ",SIze NULL,i,NULl,); . If (list->current ; element == mark elements(llst,lfULL,NuLL,msg,slze,appl)) for ( ; element; element = element->nxt) If (element->marked) ( hdr "" iP E HDR*) &element->length; if (co or)-hdr->color = *eolor; if (bkgdl h~r-~bkgrnd = *bkgd; if (fIll) . . hdr-~flll ~ *fl1l; if (pa t) hdr->pattern = *pat; cl,lange area(area,hdr->row,hdr->col,hdr->height,hdr->width) i llst->changes++; ~ til VI U. o .N 00 l.JJ \0 708 709 7]0 711 712 713 714 715 s:: en s:: 7]7 0 720 I o -I 1 en o "'T1 r I:t:- o o o o o o ..... o 01 0) 0) 716 7]8 719 Bac~ground(area,listlmsg,size) re91ster ~nEA ~area; Ieglster LIST *llst; reglster long msg, size; { area->color = *Fin~ trip1eIms g , "colr" ,siz~,&area->color I,NULL)' area->pattern "" *Flnd triP e(msq "gat", slze, &area->patte.tn, I, HlJLL) ~ c~~nge area(area Q ,o,MAX ROW/MAX C L); 11st->changes = 1lst->erases = IT I ~ ~ 721 722 723 724 725 726 727 728 729 730 731 7]2 733 734 735 736 737 738 739 740 711 712 713 711 715 746 717 718 7,19 750 751 752 751 754 s:: en s:: I o -I 0 1 en o "'T1 r I:t:- o o o o o o ..... o 01 0) ...... 755 7 ~)6 757 758 759 700 761 762 76J 764 New picture(cur area list) regtster cunRENt 'cur; regtster AREA *area: reglster LIST *llst; ( register ELEMENT *element; regIster long max, maxe; short def f11ax : : : 20 I ~ def maxe = 10° ' def-bkgd ." BL1\CK, - def pa t = ella r ~ ::j 6; for (element ~ list->first; element; element = element->nxt) element->deleted = YES; . llst->current = l~st->flrsc = l]~t->la~t = NULL; ~lst->chang~s = llst->erase~ = llst->slze = o· If (Find trlPle(<;:ur->msg,"flle"rcur->Slze,No,6,NULL)) return(Old plcture(cur,llst}) ~ else ( eur->owner = cur->~enderl strcpy(cur->l)ame,Fll1d trlple(cur->rnsg,"n a me",cur->size,&none,l,NULL)); area-~max helqbt = ,",,(short~)Flnd tnple(cur->msg,"size",cur->size,&none t 4,NULL); area->max w1ath ",,"" ( s h or t "') ( find t rip 1 e (eu r - >msg ( "s i z e" , cur - >;;i Z e , &11 0 ne 1_ 4 l, NU f,L) + 2 i area->color = *f'111<;1 trIPleicur->lnsg, 'bkgd", ellr->slz~, ecdef bKga 1 NOLL' area->patt~rll = ""Flnd trlJi e(cur->msg,"p,at II Cl1r->Sl~e,&def pat,i NUL ~; cllr->tllghllght = '" Find trIple (cur->msg, '111gh (I cur->s lze I &none I I, NULL) ; LIt LIt o J,) 00 w L eur->chec}<. = 1.0 f (area->JIIax heIght: l= 0); max = " . d ("'(short*)FlnQ tnplelcur->msg,1I111ax ",cur->SlzEi!,& ef max,2,UULL))IU ~laxe = *(short"") FIIld trIp e(cur->msg, "maxe",cur->slze, &def ma){e,2,IlULL); If (ma){e & 1) ++l\1axe; ] jst->pool.n = max; 11st->~OOJ .. size = ma){e + siZBOflELEMENTl + 10; llst-> oQl.ptr = (ELEMENT *) ~l oc(max* Ist->pool.size,YES); memset 11st->pool.ptrho~maX.llst->gOOl.S1Ze); cl~ange area(area Q,o,MA1I. ROH,I1AX C L); llst->changes = 1lst->erases = IT reply sta tus (cur->msg, "+crea te" , i, comple te" , 0) i return (YES) ; ~ ....:J QCl 765 766 767 768 Old pictund cur-Il ist \ register CUI<r~EN" regIster LIST ~cl,1r' 770 ( *p 769 771 772 773 774 775 776 777 778 779 reqJster char CONNECTOR Cllr->owner cllr->sender; If {p == Call(DIRECT file.Pi1' . Newm$q(64,"re q d","c(;mf1= C: slze=#l",&flle,-ll tala)) If (R = FInd trIple ol"data""O,(WLf.,r4f.H(J~,) araw elements{r.,!J.(long*)(p-4) 115 ,NUl.L ; Put( DIRECT If ile. pld, Newmsg (32, 'close" ,"conn="c" r &f11e ) ) ; reply status(cur->msg,"+open","complece",O) ; w1111~ 785 786 787 788 789 } else 790 792 79~ 795 796 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 0) co flle; ~ (char*)l; "name=NS; omod=~S; amOd=#S(',cllr-5.tlle,"R",NULL) ,&file)) 7n~ 793 == I-l strcpy (cllr->n(;lme, F jnd tr 1 pIe (Cllr->msg, "rl'i me " , Cllr->s 1ze, &nol1e, 1 , HULL) )L' 9trcIJy (cllr-> f 11 e, FlIldo-tr Iple (cur->msg, "t lIe" , CUr->SlZe I cur->name 11, frO L)); If (~cllr->file) { if (connect to(HEXT "File TIlgt" Newmsq(\i4,lopen" 780 781 782 78J 791 *llS~; } (p) Vl == "ut S 00 w \0 return{'iES) ; , reply_status(cur->msg,lI-open"/"canlt open f11e",0); else reply status(cur->msg,"-open","no fIle name",O); return{NO)"; I I-l QCl Q 797 798 799 800 001 802 00) BO~ 805 ROG 807 B08 809 810 011 S~ve IJicture(cur,list) *c~r' . LIST· "'11st: *file name, *m, *p1 { register char *~lement; reqlster ELEMENT fl1e' CONHECTOR leng~h = 0, num; unsigned int if (! (file name == Find triple(cur->nlsg, "file",cur->size/NULL,l,lIULL))) file nallle == cur->file; if (*flle name) if (element ~ . ll1ark_elements(llst,&length,&num,cur->msg,cur->size,cur->appl)) CURnE~T OJ2 814 U)6 B17 818 aJJ 815 (f 11 e . p 1d) l 819 822 823 824 1125 [126 827 028 829 830 'II OJ1 I o -I ,0 en o1 "'T r ,:t:o o o o o o ..... o 01 0) CD 832 033 834 835 836 8J7 83B 839 840 841 } else else ~N 00 . N~wmsq(num+50,"wrlte" ('conn=flc; data=#A",&flle,l1Uffi,llULL); =:; (short *1 w 1.0 p :::: NU~tL; PLltlDIREC'l'rIlle'Pld,m) ; Put IHHECT, flle.pld,Newmsg(32, "c~ose", "conn=llC" (&file)); rep y status(cur->msg,l!+save","plcture savedll,O}; reply_slatus(cur->msg,"-save","can't open/create filen,O) ) else Ul "Ut o - lengt.h + 4 "* nu1l' + 4' p =: Flnd triple(m,"datn",D,NLlLL,lLNULLli lor ( ; element; element ~ elemenc.->nxt) If (elernent->marked) ( memcpy{p,element,element->length) ; p += e ~ment->length; Long al~gn(p); } num Tn = 820 021 s:: en s:: QC) if ('ConneQt to(NEX! "File mgt" N~wmsg(64 "open" j'name=nSr omod== Si amo~=nS"~ft.le name;"w'fNULL)/&file)) Connect to(~EXl',"Flle mgt' NlifWlnsq(64, 'create", • . • "name""RS; omod,"'ffSr amod=="S",flle name,"\>JH,lIULL) ,&file); ]f .... .... reply_status(cur->msg,"- save ","no elements",O): reply_status(cur->msg,"-save"," no file name",O): .... QC) N i 042 84J 844 845 846 017 U48 849 850 851 852 853 854 855 856 857 858 859 060 861 862 863 864 865 866 867 e6G 869 870 811 072 073 874 015 B76 877 878 879 8BO s:: en s:: I o -I 881 8U2 883 884 885 0 8136 087 en DU9 1 o1 "'T r I:t:- o o o o o o ..... o 01 ...... o ons 890 Appl (cur list) CUHI;H!:H'l' ' *cl,Ir reglster LIST *llsf; { register APPL ~appl; regIster long name; regIster short *p; name =- *f1ong.*} Find tdplefcur->rnsg,"name",c\lr->size,&nOne,4,NULL)i for (app "" llst->appls; app && appl->name "" name; appl :: appi->nxc) ; If (.appl) . appl = (APPL *) Alloc(slzeof(APPL) ,YES}; appl->col1n = cm;->sender; . p = (short 'Ill FInd triple(cur->msg,"org ",cur->slZ9,&none,2,JlULL); appl->row = ip++: appl->col = *p; appl->name = hamel appl->conn ~ , , I ~ QC lJl *(CONHECTQR ,q Flnd trlple(cur->msg,"appl",cur->size,&none,4,IHILL); appl->nxt = 11st-~applsT llst->appis = appi; tit Vt o tv Mov~ mark(ctlrJ.Rrea,list) reglster CURR~HT *cut; reYlster AREA *area~ reglster LIST *llst; { regi ster P E IIOH ~hdr; reglster short *pos; char *q; if (pos == (short II) Find triple(cur->msg,"at " ,cur->size, NULL, 4, NULL) ) { if (cur->markl erase mark(cur,aren) 1 else ( q :: cur->ll1ark = Alloc(si,z,eof(P .E_HQPl+30,Yf-S): 1 draw_llne(&q,O,o,VCllAi'{__llI,O,IlULL,YEL ,ow, S ,O,l,NULL); hdr"" (P E IIDR *) cur->marJ<: hdr->ro,,/=-*pos+l- - ((hdr->ileight hdr->cQl ~ *pos; CVr->dlsplay mark 11st->challgesl-+ ; = YES: - VClIAR - . lIT) / 2); 00 W 10 ~ QC ,j::>. 891 892 89J 894 895 896 897 898 899 900 901 902 90) 904 905 906 907 908 909 9]0 9] 1 912 913 914 9] 5 9JG 9J7 9JB 919 920 921 s:: en s:: I 0 -I 0 1 en 0 "'T1 r I:t:- 0 0 0 0 0 0 ..... 0 01 ...... ..... 922 923 924 925 926 927 928 929 930 931 932 Query mark(cur) regIster CURRENT *cur; ( register P_E_I1DH *hdr; if {hdr ::;; (P E m)}1 *) cur->mark) else . Heply (cur-:;>ntsg, Newrnsg (64 r "mark " , "a t== H 2s" , hdr->row , hdr->col) ) ; reply status(cur->msg, II-mark?", "no mark defined",O) if (cur->old ma~k) Free(cur=>old mark) ; clIr->old mark = cur->marki cur->mark = NULL; list~>challges++; QQ tit i Set mark(ctlr,l,area,list) reg1ster CURKENT *cur; regJster AREA *area; regIster LIST 'lIst; ( register P E liOR *hdr; if ((hdl' ::: (P E HDR*) Find triple (cur->msg, "da ta" I cur->s ize, llULL, 1 t NULL) ) && hdr->length) if (cllr->mark) ( erase mark{cur(area); Free (cUl~->lTlarkJ ; Free(cur->erase mal'kLL" CUr->erase mark-= HU ; } cllr->mark "" Jl.lloc(hrlr->lengthIYES); memcpy (cur->markkhdr ,.hdr-> length) ; cur-~aIsplay mar ::: yES; J else ( ... lIJ In o tv 00 W \0 ... QQ =-- 9)) 934 935 9)6 937 938 9J9 940 941 942 943 944 945 946 947 948 949 950 951 Rest-ore ll1arJ«c\lr,area,list) reglster CUHHENT *cur; reg1ster AREA *ar ea : regIster LIST *llst; { if (cur->old mark) { if (cur->rnark) ( erase mark(cUr,area); Free(cllr->mark, ; Free(cUr->erase markl ' cur->erase mark-= NUL L: } cur->mark = cur->old mark; C\lr->old mark = NlJLl,-r 1Ist->changesl+i ~ QQ ....;J Ul 'Ut o 952 953 9511 955 956 957 958 959 960 961 962 963 9611 965 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 ...... I\) 966 967 968 969 970 971 to 00 W era~e \D mark(curharea) reglster CORRENT *cur; reglster AREA tarea; { if (!cur->erase mark) cur->erase mark = Alloc(*(short*lcur->rnark,YES) . memcpy(cur->erase rnark,cur->mark t (short*)cur->markj; ((P_E_I1DR *)cur->t!rase_mark)->co 1or :=: area->color; Edit text (cur I area, l.ist, msg, size, appl) *cur; AHEA *a rea; register LIST *llst;, regIster long ms g SIze; CURRENT long { app_1; ~ QQ QQ 972 973 974 975 976 977 978 979 980 981 982 983 984 985 98G 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 100) ]004 1005 1006 1007 ]008 ]009 ]010 s:: en , s:: o -I 0 1 en o1 "'T r 1'1> o o o o o o ..... o 01 ...... W ] 011 10] 2 ] 0 1) 1014 lOIS ]0]6 1017 1018 1019 l-eglster char regIster short short ELEMENT *p, c, *text start, "'new' shlft, offset, sel offsef, ok sel lenqtll ; _ . *element; p E IlDR = YES; "'lIdr; if (list->current = element = mark elements(list,HULL,NULL,msg,size,appl)) { offset:= *(short *l rind once(mSQ(" o ffs ll ,size,&nOne,2,HULL); hdr. ;::: (P E !lOR *) &e ,ement->lengE 1; if (hdr-:?type "'= 't') ( text start = (p = va]u~(hctr) + sizeof(long) l + 2 '" sizeof(short); If (slq ft '" '" (short*lFllld oncelmsb' "shft", sIze, &none, 2,0» ShIft text(p I tex' rtar~ sh ft ,. '" 'r, 1£ (FInd once(rnsg,"set ",slze,HO, ,NULL») ( sel offset == *«short *) 12)++; sel-lenqth "'" *(silort *) Pc ok ~ (offset < sel lengtll/; I ... QQ \C oJ I offset += sel offset; && (offset < strlen(text start)))) p ~ text st~rt + offset; Ul 'Vl I If (ok'" (ok { o ~tv 00 w If (new ~ F'lnd once(msg,"new ",slze,HULL,l,ItULL)) 1.0 \Vhil~ (c =-*newl I) If (c > 31 && c < 127 && *p) ( "'pH == c; else If (c == 8 && P > text start) *--p '" , '; If (F:ind *r' - once(mscr,"blnk",size,NO,O,IIULL)) 19 r '( . ;(p++ "" , ,). If (FInd trIp e(msg,"by ",size,Ho,O,HULL)) r , • , , MoVe(6rea,list,Wsqrsize,appl) Draw(l st,msg,slz~/; ( } 1 else { element->chanqed = YES; llst->cllangesf+ ; } ~ove ,ark(cur,area list); i f (r~l1d once(lnsg,"fast',size,Ho,O,NULL)) Ilst;>erases = 0; , ... \C Q 1020 1021 ]022 ]023 1024 J else )025 1026 J027 J028 1029 ]030 ]031 1032 1033 1034 )035 1036 ]037 ] 038 10)9 1040 ]011 ]012 1013 J 04 4 1045 1016 )011 1018 )049 1050 )051 ]052 1053 ]054 lOSS s:: en s:: I ]056 1057 J058 ]059 o -I 1060 1 1062 0 en o1 "'T r I:t:- o o o o o o ..... o 01 ...... -Iloo )061 J else J else reply_status(msg,"~edit","outside text string",O)i reply_status(msg,lI-edit","not a te}{t element",O); reply_status(msg,"- edit","not found",O); "'" '= "'" shift text(sel,text,lldlars) reg 1 ste L slJOrt *sel L nchars; regIster char *tex~: ( register short length, n: if (length = strlen(text» = length'" nchars) > memcpy(text,text+n,-nchars); Ipemset (text-nchars,' ',n); If (*8e1 - n >= 0) IIsel Jli else ( *sel "" 0; *(sel~l) += *sel - n; l.f {nchars < 0 && (n ( VI 0) 'tit 0 N 00 \J.l \0 -:0: ) ) else if (nchars > 0 && (n == length - l1chars) > 0) ( mel1lcpy(text+length,textlnchars,l1chars) i Ipemset(text,' 'n); If (*5e1 + n < iength) *se1 -:= H; else ( *sel = length - n' *(se1+1) -= *sel ~. n - length1 ""'. ~ )OG3 1064 1065 ]066 )067 ]068 ]069 Ani~ate(cur~list) register CUl{REN'I' regIster LIST *cyq { *anim; *name; oid; regjster AHTM reglster char *11S['; }070 )072 reglster10ng char if (J;1ame = Find trirle(cllr->msg,"name",cur->size,HULL,2,HULL)) if (strlen(nameJ < 16) { for (anim = li~t->anims: anim && strcmp(name,anim->name): alllrn = a111m->nxt): i f (I a 111 m} , If (pid = HewProc(name,"//processes/anunate",YES,-l)) { anim == (1\IHH *) Alloc(sizeof(ANIH), YES); anlm->conn.pld ~ pId; strcpy(anirn->J;1arne,na~e); anlm-)nxt = llst->anlms; list->alllms = anlm; m ~ Alloc(cur->slze,YES) i ll\p.lncpy (m cUr->msq, cur->~ 1 ze) ; put (IJIHECT,anilTl-5conll.pld,JII) ; } else reply status(cnr->rnsg,"-allimate","not supported",O); else reply_status(cur->msg,"-animate","duplicate narne",O); J 071 ] 073 ]074 ]015 ]076 Ion ]078 ]079 ]080 ]081 ]OB2 lOU] ]08~ ]085 ]08G ]087 ]088 ]089 1090 ]091 ]092 ]093 )09~ s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 ...... 01 ]095 1096 1097 ~ ~m; VI 'tJl o ~N 00 til \0 ~ \C ) l~lse ~ \C reply __ st.alus (cur->rnsg r "-animate", Itname too long", 0) ; """ ~ ]098 1099 ]]00 11 01 ]]02 llOJ ]]04 1]05 11 O(i ] IO} 1108 ] ] 09 ] 1] 0 ] ) ]l ] 11.2 ]] n ]114 )]]5 11]6 ] ] J7 ) J J8 ) 1 19 1120 ] ) 2] 1 1 22 ]123 ] J 24 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 ...... 0) 1125 l\lt~r(cur \C !.Il list) reglster tURRENT t eg 1S ter LIS1' l , regls t er MUM reqlster char *ct)r i *11SC; *anim; *name; conn; CONNEC'l'OH if (name == Find trlple (cur->rnsg, "name", cur->size, HULL, 2 ,HULl. ) ) { for ( ' = li$t->anims; anim && strcmp(narne,anim->name); anlm alum alllrn->nxt) : if (anlm) ( 90nn = anim->conn; If (!strcmp(cur->msg,"cancel")) ( I' t ' , IS ->an1ll1S == alllm->nx t ; F'ree(allim); ~orward (DnmcrfLconn. pid, cnr->msg) ; cur->rnsg = NUL ; } else reply_status(cur->msg,cur->msg,"not found", 0) ; Vl "Vl o !!:: tv "00 w \0 ~ \CI =" 1]26 1127 1 J 28 ]129 ) l 30 ll31 llJ 2 11)] I ] 34 ]J35 ] ]JG ]J)7 ( - *p tolerance; *element; ELbMEUT *fllld_box() i regIster P E flDR ~. olerance )140 J ] 41 1 J4 2 1143 = ($hort ] 14 5 ]116 1 } 41 ]14[l J} 49 1150 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 ...... ...... Ul U. S 00 UJ \0 J else 1151 o -I I if ((hdr-~type :::::=" 'm') &&. (*value(hdr) ,,-,= IV)) sel 1Ist(hdr); element~>chanqed = YES; llst->changesf+; }\eplY (m5g r Newtnsg (hdr-> lengthl50, "wr i te" , !Ida ta= He ~ e" ,hdr ,lIUL[J) ) ; 1114 I *hc;l.r- ::: """ (short *) Find triple ~mGg, "tolr" si ze, &110ne 2 {NULL) : *) Fina trlpte(msg,'pos ",sl2e,&none 4 HU LL}) ]f (llst->current ~ elemeJ\t::: find box(*p,*(p·l-lj,iist,appl)) { l,)(Jr =;, (P E I,fDR *) &element->length: If O'lnd-trIple(msg,"sel ",s ze,NO,O,NULL} && hdr->attr.selectable) { hdr->attr.selected ~ YES' If (p ]139 s:: en s:: . short regIster ELEMENT reg~ster J138 1]52 1 153 ]} 54 1155 .... IC '""-I IIi t( list, msq ~size,al?pl) rcg.]stcr 1,IS'1 *lIst;, regIster long mS9, SIze, appl; else reply status(msg,msg/"not found",O); reply_status(msg,msg,"missing \'pos\"',O}; .... IC GO ] ] 56 1157 lJ 58 1159 1160 1161 ]162 1163 1.164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 ]176 lJ77 ] 178 11'79 1180 ]J 81 ]]82 J) 8) ] 184 1185 11 !J 6 s:: en s:: I o -I 0 1 en o "'T1 r I:t:- o o o o o o ..... o 01 ...... CO ll8 '] 1188 )l89 )]90 1 ] 91 1192 119] )]94 ]) 95 ) 196 1197 1] 98 1199 1200 ]201 1202 120J ELE~fENT "'find box(row,col,list,appl) reglster s~ort r~v, col; regIster I~ST *llSt; reglster long appl; ( register P E IIDR *hdri reglster EGEMENT "'element; for (element:::: list->lasti element; element = element->pre) ( hdr ~ (P E IIDR "") &element-> 1ength; . if (in boxthdr->rOW1hdr->COl,hdr->he19ht,hdr->widlh1rOW,eOl) &&-!~lement->deeted) if (!appl (appl == -1 && ! *(lonq*) (hdr+l) appl ::::= *(10ng*) (hdrtl») break; ) return (element) i I-l I.e I.e I in 1~ox(r,c,h,w,Cl,e2) register short r, e, el, e2, h, w; { UJ 'til if «el < r) j I (c2 < c)) . return (NO , If «(el > r + h) II (c2 > c + w») S 00 w 1.0 return(l>1O) ; return(YES); sel list(hdr) register P E IIDR )l;hdr; { - register P E BOR *temp, *first; short - len) char *p; [or (fir~t == temp = firs~ macro(hdr,lfULL,&len,&p)· . temp && telTlp->attr.llldden: temp::::: next_macro(&len, &p)); If (temp) ( temp->attr.hidden:::: YES: 1f I! (temp ~ next maero(&len,&p))) temp "" fh'-5t~temp->a ttr.llldden := NO; ~ = 1201 1205 ]206 1207 1200 1209 J210 ] 211 . 1212 1213 1214 1215 ] 2 J6 12]7 12)8 ]219 1220 ) 221 ] 222 ] 22'3 ]224 1225 ]226 1227 ]228 1229 1230 1231 ]232 ] 23 J ) 2] 4 )235 J236 12]1 ]238 1239 ]240 ) 24 1 s:: s:: en I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 ...... CD ] 242 121J 124~ 1245 1246 1247 124B 1249 v i(!\~port (cur{ area, list) rcg1ster cun~EHT *cur; regtsler AREA *area; regIster LIST *llst; ( reClister VIEW 'view, 'prev = NULL; cutNECTOR 'conn; ELEMENT *element: unsigned lilt length'" 0; char "'p: if (p "" Find triple(cur->msg,"area",cur->size,HULL,B,HULL]) ( for (v~e; = ll'st->views; view && (view->owner.pid != cur->sender.pid); Yle~ = V ew->nxt) ; if (view), . rnerncpy(&vlew->row,p,4*slzeof(short)) ; else ( v~ew = (VIEW ~) AIIQc(sizeof(VIEW) ,YES) ; vlew->nxt = 11st->Vlews; vlew->owner = cur->send,r; m~mcpY(~Vlew->n;>w,p,4*s.tzeof(short)) ; 11st-~vlews = view; 6hange area(area,view->row1vjew->coliview->height,view->wjdth); element = mark area(area->rl~area->c ,area->r2,area->c2 list, HAX P E NOLI., NULL, NULL, &lenq th, NULL Qur->appll • send(cur,area7Iis~,o,lengtll(element,YES,cur->~lsplay malk,YES) r I J '"'" U't U't o J-l 00 W \0 - else ( ~ Q conn "", (COHNE~TOR * 1 F ina ~rlp 1 e (cUJ;->msg, II conn',' ,Or &cur->senc)er, B, HULL) ; for (VIew ltst->vl8ws; vlew && (vlew->owner.~l1d ."" conn->pld); = prey = v1ew, Vlew = Vlew->nxt) ; J f (Vlew) ( if (prev) prev->nxt = vlew->nxt; else li~t->vlews ~ view->nxt; Free(vlew)r , I I ~ Q ~ 1250 1251 ]252 ]253 ]254 ]255 }256 1257 ]258 1259 ]200 ]261 1262 126) 1264 ]265 ]266 J267 J268 1269 ]270 chaQge area(area,row,col,height,width) reglster AREA *area: regIster short 1:'0\1, col, height, widthr ( if (row < area->rl) area->rl "" row' if (col < area->c1f area->cl = col: if (row + height> area->r2) area->r? = row + height; if (col + wldth > area->c2) area->c2 = col + width; register C6RRENt regIster AREA IJIST { ]27) ]2132 1283 ]284 1285 1236 ]287 ]288 ]289 s:: en s:: I o -I ]290 ]291 1292 1293 ]294 1295 0 1296 en ]298 1299 1 o1 "'T r I:t:- o o o o o o ..... o 01 CO o 1297 ~ notjfy(cur area list\ 1271 ] 272 ]274 )275 ]276 1277 ]278 ]279 1280 1281 ~ "'hsti register VIEW register lnt "'vieW; length; for (view = list->views; view; view"" view->nxt) ( length"" mark changes(1is~->firsL view->row;vlew->C91,new->helght view->width) . Send(CUr,area,llst &Vlew->owneL,18n g fh,list->flrst, VES,cur->dlsp 1ay_mark,list->erases); VI U. S "00 w \0 chan g es(element,r c,h,w) *e 1ament; mar~ reglster ELEMENT register short { ~cur; *area; reglster r E 1I0R reglster Int- r, c , h, WI *l}dr: lIst_length ~ 0; for ( : element && ! element->chanqed; element", elemsnt->nxt) fOI:" ( ; elemel1t; element = element->nxt) ( ; hdr :: (P E IIDR *) &element->lenqth; . if (element->marked ;: (~lement-5changed && ! hdr->at tr .Illdden & & (hdr->row + hdr->h~lqht >= r) && (hdr->row <"" r + h) && (hdr->col + hdr->wldth >"" c) && (hdr->col <= c + w))) list length += hdr->length + 3; ) return(list_Iength) : ~ 1] 00 )JOl ]]02 ]]0] ]J04 1305 1]06 ]307 1]08 13 09 13] 0 13] I ]]] 2 1 J] 3 1311\ 1)}5 13] 6 ]317 13] 8 1)]9 ])20 lJ21 ]322 sell() (cu r, ar.ea ,). ist, proe, AREA LIST regIster leqlster regl ster regIster ( . regls t er P E IIDR reglster short char EL8MENT 1327 1328 1 )29 1]]0 ) ] Jl )]]2 ]]]] 1334 lJJ5 ]336 13)7 1J38 1339 ]]40 o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 CO ..... 1)46 redraw_hkgd 0 pt= element length; Long_al1gn(pT: I } if (mark) p := set rnark(p cur); 13n ]349 1J50 1351 ~(short *) p "" NOLL; If (proc) else 1340 1352 Q ~ ; + 24; for ( ; element: element ~ element->nxt) ( if (element->marked && lelement->deleted) ( element->marked = HO; elemellt length'" element->length; rnemCPYJJ:lt &eJement-> length, (long) element length); hdr:= r E IlDH *) p; if (lnO Ifyt l if (hdr->attr. selected) element length"" set selectfhdr !.cur->h i ghlight} ; i f ((hdr->type == 'mIl &li (*yalue(hur) === fl.')} element length :::: ~acro llst(hdr); if ((l1dl."->type =::: 't')) . element length:::: check text{hdr,hdr->length); If (cur->appl) element length :: change origin(hdr,cur-->appl l"OW,cut"->appl col); ) - 1325 1326 I ,I.- p '" (m = Hewmsa(lenqlhl-JOO . Itwritelf,"data==#A~ type=nc",lengthI250,HULL,'P')) i f (element) ] ) 21 s:: en s:: N *hdr; element lenqth; . *ro, "'p,--,l.-fleC mark(); if (redra\~) element = redraw bkgd(area,llst/&m,&p); else - ]]2] ] 311 ]3 4 2 ]34'3 13 4 4 ] ] 45 length, element, mmllfy, mark, redraw) *cut; *area: *llst: CONNECTOR 'proe: unsiqned illt length; ELEMENT *el~ment; unsigned short modIfy, mark, redraw; recpster CUHHr;NT rut(DIRECT,proc->pid,m) ; Reply(cur->msg,m) ; lJl "Vl o ~N 00 W \0 N Q Q\ US) 1)54 ]]55 1356 1357 ]]58 lJ59 1360 )361 1362 1363 JJ64 ))65 ]366 ]367 )] 68 ]]69 1370 1371 ]]72 ] 373 chaiNe origln(hdr,row col) regIster P E nDR *ldr; r re(Jls tet sHort row I col; l if «hdr->ro w -= row) < 0) . return(Ol; If «hdr~>co -= col) < 0) retlJrn(Ol: retut"n(hdr-> ength}; char *set mark(p,cur\ reglster char ~p; reglster { . If { CURRENT *cur; (cur->erase mark) melncpV(Ptcur->erase mark, * (short*)cur->erase mark) i P += .(slort *) Pi - ) 13 74 If (cnr->Jnark) 1377 JJ 78 memCPV(Ptcur->mark,*(Shortlr)Cur->rnark) ; p ~= ~(slort *) p: J return(p) i 13 75 1376 ]]79 1380 1]81 )382 lJ8 J 1384 1385 1386 s:: en s:: I 13B7 1308 1389 )390 1391 1392 0 ]39) 1394 1395 }396 en 1397 1398 o -I 1 o1 "'T r I:t:- o o o o o o ..... o 01 CO I\) ~ ""-l VI U. o ( N 00 w \D ELE~ENT *redraw bkgd(area,list,buf,ptr) regtster AREA -*area; reg~ster LIST *lIst: regIster char **buf, **ptr: { ~LEHENT *element; lilt lellgth, flumi elemen t miil rk area (area->r 1,. a.rea ->01, a rea-::> r2 l area ->c2 c 11st7HAX P EiNULLf~ULLtNULL,&length,~num,NULLJ: lenqth +::: (4 * Iluml" T 50: *buf. :::: Ncwmsq(length+50 "write" "data=MA; type=#c" length HULL IPI). *ptr = *buf f 24; " " , draw filled rect(ptr,area->rl area->cl, (area->r2)-(area->rl), t a rea->c2)-(area->cl),NULL,o,o,area->color / atea->pattern,O,O,O/NULL); return(element) : I ~ ~ 1399 ]400 1401 14 02 1403 1104 1405 1406 1407 1408 ]409 1410 I'll J J412 1-113 l'Il tI 1415 1116 1417 1418 1419 set se 1 ect (hd r. J}l igh option) reg1ster P E HuH -*I}dr: . regIster char hIgh optlon; { register short length; length = hdr->length; If (fhigh optiqn) hc;lr->CI~tr.Inv~rt = Ihdr->attr.invert: else If (Illqh 9ptlOn ; : = I I I) 14 22 142) H24 ]425 14 26 1tI27 H28 ]129 ]4JO 1431 1tI J 2 J41J 1434 ]435 H36 1437 14 38 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 CO W J439 14 4 0 ]40 14 4 2 144 J 14 4 4 14 4 5 1446 144'7 11\11 8 o 11c;lr->a~tr7lhvert == Ihdr->attr.invert; else If (l11gh option "'== '11'1 hQ r->n t tr71nql) 1 19h t '= ! htlr-> a t tr. highligh t; else If (h1gh opE1on == 'e') { if (htlr->type != ' m') { hdr->color = (hdr->co}or 1 1) % 7 + 1; if (hdr->( jl ] ) hdr->f111 == (hdr->fill + 1) % 7 + 1; } 1420 14 21 N I,C IJt IJt else macro color(hdr); -, else if (Ildr->type :== 't') se t text (hdr, high option) : return (length) ; - S } be liJ \0 macro 1 ist (hdrl l'og l.Gter l'- E- lI()R *hdr: { regjster P E 1I0R *temp; teglster; sllort row, col: short lell: char *p; row = hdr->row, col ;;; hdr->co~; for (temp = filst macro(~dr/NULL/&len,&p) • . temp && temp-)'attr.lndden; temp = nex~ macro(&len,&p)): If (temp) ( ) memcpy(hdr,templt~mp->length) hdr->tow := row; hdr->col ::: col: return(hdr->length) ; : N ~ o 1449 ]450 1451 ]452 )453 1454 1455 ]456 1457 1458 1159 ]460 1461 1462 macro color(hdr) regIster P e llDR "'hdr~ ( -- "'temp; register P E IIDR short - len; *p; char for (temp::::: first_llIacro(hdr,NULL,&len,&p); temp; temp = next_.l1Iacro(&len,&p) { temp->color.~ (temp->color + 1) , 7 + 1; If (temp->flll) . temp->flll = (ternp->flll + I) % 7 + 1; N io-ol io-ol 1463 1461 1465 1466 14 67 1468 1469 1470 1471 H72 1473 1474 ]175 )4"76 }01 14 '7 fJ 1479 1480 14 91 1402 14 83 14 64 14 85 H86 1187 1488 14 89 1490 s:: en s:: 1491 1492 14 93 0 1495 1496 I o -I 1 en o1 "'T r I:t:- o o o o o o ..... o 01 CO -Iloo }494 1497 119B 1499 1500 sel text (hdr, high option) reg1ster P E 1I0H - *hdr; regIster char high option: { register TEXT_OPTIONS hopt: Qpt ~. (TEXT OPTIONS *l value(hdr); II (lllqh optIon === '.b ) opt-~bQrder ~,YES; else If (hIqh optlon === 'U') opt->underlln, ~ YES' else If (high optIon == 18') opt->bold-= YES; VI 'tit o tv 00 w \0 che9k text(hdr~lengthl regjster P E IIIJR *hdr' regIster short lengLh; ( . regIS t er char 'lip; cbar "'h; regIster 'l'EXT_OPTIOHS "'opt; QRt = (TEXT OPTIONS 'Ill value(hdr); ] f (opr.->border && hdr->flll) { opt->border = NO: p = (ch~r *) hdr + length; Long align (p) ; n = p; draw l-ect (&n, hdr->roW-34 hdr->col-J ,hdr->heightt6 I hdr->width+6, NULL,hdr->flll , 'S'L1,HULL); length ~ n - (char*)hdr: ~eturn(length) : ~ io-ol N 1501 ]502 150) 1504 1505 ]506 ]507 ]508 1509 1510 1511 15)2 15]3 1514 15]5 1516 1517 EI~.·MENT *mnrk elements(list,length,num,msg,size,appl) '1<1 1st' unslgned jnt *leng£:l), *num; long msg, SIze, app1: ( register short row ~ 0, col ~ 0, number = 01 count = 1; regIster short to row'" HA,X ROH, to col'" MAX COL, *p; reg~ster ELEMENT *element; regIster char *tag pat = NULL; cilar wha~-= HULL, tag buQ200), *text pat = NULL, dOt "" YES; long *triple, atcr = NULL, el~ment = NULL; , whIle (p =: (shor.t~ I.) Find triple (msg, "P\O\O\Oll, size, NULL, 0, &tnple) ) L1ST ( switch ("'triple) ( JS1B )519 1520 case Keypack ( I @' , I c' , I h' , I t ') : case Keypack('@I,'s','e','l'): case Keypack ( '@ I , 'n I 1525 1526 1527 1528 1529 15)0 1531 case Keypack ( I (l' , I , p' , 'u I , I '0 ' , m') : 's') : case Keypack ( I @' , 'e' , In' 1 I d') : 15)2 IS)) 1534 )5]5 case !{eypuck ( , @, , 15]6 't' 1 I }{ , , , t' ) : 1537 lSJU lS40 15]9 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 CO 01 1545 1546 J 541 1548 1549 ]550 1551 ]552 1553 1554 1555 1556 count == *p: break' attr *(long *) pi break attr OXBOOO; break, number::: *p; what ::: HULL; break; row = *p++; col == *p.. what = 'A'; break; to row '" *~H; to-col "" * ; what"" 'A', break; text pat = Alloc(500,YF.S); If (1makpat(p,text pat) ( Free (text pot)L' 1= 1= text pat ) 511 ]542 ] 543 ]544 ~ - case Keypack(' @I, 'a I , 't I , 't') : ] 521 ]522 1523 1524 N ~ case KeypC1ck('~', 't' ,'a', 'g'): ~reak; - ~ Ul Ut o J0 00 W \0 NUL ; If (!makpat(p{ (ta9 pat tag_pat a 10LL,- ~ tag buf»)} - N ... ~ ltriple '" HULL; dflt :: 1I0i if (dOt counl ::: MAX P E; if (!wi1'lt) - - element ::: m~rk number(number,taq pat,text ~at, , llst,count, attr, lengtfi;num, applJ, else] f (wl1at :::::: '1\') element::: mark area(row,col,to row,to COl r list cQunt, attr,tag_pat,t:ext_pat,lengtl1,num,app 1); if (text pat) Free'rtext pat); return(e ement}; ] 557 ] 558 ]559 1560 1561 1562 ELEMENT "'mark area(row,col/to row,to col, list, ]564 1565 1566 ]567 lonq 1563 1568 1569 ] 570 1571 1572 1573 ] 574 ]575 1576 1577 ] 578 1579 1580 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 CO 0) 1581 1582 158 J 1584 1585 1586 1587 1588 ] 589 1590 ] 591 1592 J 59) ] 594 ]595 )596 1597 1596 . . regIster short count,actr;tag pat,text pa1:./1ength,num,appl) row, col, to row, to col-;- count; LIST *llst; at~r' - - char. "'tag pat, "'text pat; unslgned lnt ' *length, "'num; { reglster P E HDR ""!ldri regIster ELEMENT ""element = "ULt "'temp; regIster long total lenqth::: 6; unsIgned lnt orlg_counE; if (row >= 0 && col >~ 0 && to row >= 0 && to col >= 0) ( orig count = count' . for ltemp = 11st->tirst; temp && count; temp = temp->nxt) { hdr "., (P E IlDR *) &temp->lenqth; if (bdr-:5'row <= to row'&.& hdf->Qol <= to col && row < hdr->row + hdt"->helqht && col < hdr->col + hdr->width && valid(hdr,tag pat/text pat,attr,appl) && !temp->deleted) ( - total length +~ temp->length: temQ-~marRed = YES; If {!element} element = temp; count--; ] If (length) . *length = total length; If (I1tlm) • *num =: orlg count - count; ) return(element)i ~ .... !.II U\ 'tll o tv 00 w \D N .... =" ]599 1600 1601 1602 ]603 1604 ]605 ]606 1607 J60A ]609 16]0 1611 ] 612 ] 6 jJ 16)4 ]615 J6]6 ] 617 1618 )619 1620 )621 1622 )623 1624 ]625 1626 )627 1628 ELE~ENT *mark number(n,taq pat, text pat,list,cQunt,attr,length,num,appl) short n, countT lonq tag pat, text pat, attr; lols'r *llst· .lnt *leng~h, *num; reg~ ster ELEHENT *element = IlULt.6 ""temp = NULL; reglster l0l19 total lenqt) == ; unsIgned lnt orlg_t!ounE; if (n ==: temp c ist->last; else for (temp = list->first; temp && n--' temp = temp->nxt); for (or ig cQIH1t ::::: count ~ temp & & count; temp =: temp-:>nxt) If (valld(&temp->lengtll,tag pat/text pat,attr,bppl) && Itemp->deleted) ( -total length += temp->length; temp-~marRed = YES; If I !element) element == temp; reglster regIster l"eglster unslgned ( N ~ ....;J -11 VI 'tit 8 "00 VJ \0 count--~ if dengthl . *length ~ total length; , Anum = orlg countJ- count; If (num) return(element}T N ~ Qe s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 co ...... ] 629 1630 ] 6Jl 1632 163) 1634 1635 )636 1637 163 B 1639 1610 1641 1642 160 1644 1645 1646 ] 647 ]643 val~d(hdr~tag patrtext pat,attrrappl) reglster l' E IIUR *hd1:': reglster char *taq pat, *text pat; register long attf; appl; ( register char *target, ok :::: YES; long temp, if (~ag pat) 1f ltarget = tag(hdr)l ok = amatch{target,tag pat); else ok :: NO; if (text ~atl 1f (llOr->type == 't') ok ,.. ok. && 8Illatch(value(hdr)+8,text pat); else ok = NO; ( J11p.mcpy(&temp,&hdr->attr(sizeof(long)) ; ok = ok && l~emp & attr,; ] 650 ]65l )652 1653 1654 1655 ]656 ]f { 1659 1660 return(ok) ; ) 1657 1658 1661 1662 1663 1664 1665 I o -I 0 1 en o "'T1 r I:t:- o o o o o o ..... o 01 CO CO \0 if (attr) 1649 s:: en s:: ~ I-' 1666 ]667 1668 ] 669 1670 1671 1672 ]67J }674 1675 1676 1677 ) Ut Ut o (appl) .tv if (g~P~ ok && (!*(long:lr)(hdr~-l)); else ok = ok && (appl :::::= * (10ng*) (hdrl-l)) i -1 ) 00 UJ I.D Sta~U5(msg,l size} regl.ster cnar *~5q; reg lster. long ( SlZe r register char *m; *(rn = Allo9(slze, YES)) "" puq,; strcat m,r.ltld tnple(msg, 'or1g",9ize,&nol1e,1,IIULL)); strcat m," ")T strcat m,Fina trip1e(msg,"stat",size,&none,1,llULL)); strcat m, it in-II) i . strca t ml..Find thple (ll1sg, "reg ", size, &l1one, 1, ttuLL) ) : Note(m "r:HnOR"); f'ree(mj; ~ 1678 ]679 1680 1681 1682 168) 1694 1685 1686 ]687 ]688 1699 1690 )691 1692 1693 )694 1695 1696 ]697 1698 1699 ]700 }701 1702 1703 1704 1705 J706 1707 ]700 1709 )710 1711 1712 ]713 1714 1715 ]716 1717 ]718 s:: en s:: I o -I 0 1 en o1 "'T r I:t:- o o o o o o ..... o 01 CO CD 1119 ]720 1721 1722 ]723 )724 1125 1726 1727 ]728 1729 reply status(cur,rnid,stat1code) register char 'cur, *m d, 'stat; reg1ster long *code; { register char 'type; = "failed'"I J type 1 f (I. lr i d =:::: l1qd++ • ,- else 1f (~mid ~~ '+') ( tyne :::: "done": ~ ~ m1aH- ; ~ePlv(cyr,Newmsq(strlen(mldl+strlen(~tHt'+50 type, ll 1I 0 1'.lg=#8; req=#S; stat==WS; code-'-'U",('plctute ,mid,stat,code)); ELEBEHT 'new element{list,siz9,after) l-eglster I,IST ..lUst; reglster lonq SIze: regIster ELEMENT 'after; ( register BLEMEliT *element; regls ter long i := 0; if (size <= 9t ->pool.size) for (i == lst->pool.n'jelem ent ~ list->pool.ptr; element->pbol && _ &, lelement->delet~d; ( char*)element +'" list->pool.size, --1) : IJ\ IJ\ S 11 00 UJ \0 if (i) ( if (element->deleted) delete element(llst,element): element->pOol = YES; } else ( element == (ELEHElI'r -It) 1\110c (size, YES) : elemcnt->pool "" HO: } ~ lement->nxt ..., mJIJI,' If (el~ment->pre ~ iist->last) (llst->last)->nxt = elemeht; else llst->first ~ element: list->last = element· element->chanqed ::: YES; element->deleted = element->marked = NO; return(element): ~ 1730 ]731 1732 173 3 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 174 6 l717 1748 3749 J750 1751 1752 1753 J754 ]755 1756 ]'] 5 '7 1758 1759 s:: en s:: I o -I ,0 en o1 "'T r ,:t:o o o o o o ..... o 01 CD o 1760 1761 1762 1763 1764 17G5 1766 1767 1768 1769 1770 1771 1772 l77 ) 1774 177 5 1776 1777 del~te elementflist,element) reglster ELEME~T *elementF regIster LIST jllst; { if (element->pre) (element->pre)->nxt ~ elernen~->nxt; else , Ijst->first ~ element->nxt; If (element->nKt) (element->md::) ->pre = elelllent->pre; else list->last = element->pre; if (element->po61) e1ement->pool :;;: NULL; else ,Free(li!lement) ; --llst->slze; ~ char *value(hdr) *hclr; regIst.er P E lIDR ( -register char *p: p == (char *) hdr + sizeof(P E IIDR); If (hdr->attr.appl) - p 1= 4' if (hdr->attr.ta9ged) whlle (*p-H), Long a l1gn (p J ; return(Pl; char *tag(hdr) *hdr: regIster P E llDR ( - register char *P; );J :;;: (char 'II;) hdr;- sizeof(P E IIDR); if (hdr->attr.appl) - P += 4' if (hdr->attr.tagged) retu:r.nfp); return(NULLI; lJl lh o ~N 00 lJ,) \0 . ~ 5,502,839 225 What is claimed is: 1. A virtual input interface in a data processing system, said interface comprising: means for accepting input from at least one physical device and for converting said physical device input into virtual input, said means comprising a virtual input manager process responsive to said at least one physical input device for generating a picture, said picture comprising one or more picture elements, each picture clcmcnt comprising a plurality of dcvicc-independent data structures in a predetermined, standard data format, at least one of said data smlctures comprising a plurality of different data fields each containing information describing said picture element; and means responsive to said virtual input for performing processing operations upon said virtual input, said means comprising a console manager process for performing processing operations on said one or more picture elements_ 2. The virtual input interface as recited in claim 1, wherein said input accepting means accepts input in the form of keystrokes. 3. The virtual input interface as recited in claim 1, wherein said input accepting means accepts input in the form of cursor position. 4. The virtual input interface as recited in claim 1, wherein said input accepting means accepts input in the form of system-defined actions. 5. The virtual input interface as recited in claim 1, wherein said input accepting means accepts input in the form of user-defined functions. 6. The virtual input interface as recited in claim 1, wherein said input accepting means accepts input in the form of menu selections. 7. The virtual input interface as recited in claim 1, wherein said at least one physical device can be removed from said system without affecting the operation of the remainder of said system. 8. The virtual input interface as recited in claim 1, wherein at least one additional physical device can be added to said system without affecting the operation of the remainder of said system. 9. A virtual output interface in a data processing system, said intcrfacc comprising: a source of virtual input, said virtual input comprising one or more picture elements, each picture element comprising a plurality of device-independent data structures in a predetermined, standard data format, at least one of said data structures comprising a plurality of different data fields each containing information describing said pieture element; means for performing processing operations on said virtual input and for generating virtual output; means for accepting said virtual output; and means for converting said virtual output into at least one physical output suitable for use by at least one physical output device_ 10. The virtual output interface as recited in claim 9, wherein said virtual input comprises a plurality of related picture elements and wherein said virtual output accepting means comprises a picture manager process for controlling said plurality of related picture elements. 226 S 10 15 20 2S 30 35 40 4S 50 SS 60 11. The virtual output interface as recited in claim 10 and further comprising a display device, wherein said virtual output accepting means further comprises a window manager process for controlling the display of said plurality of related picture elements on said display device. 12. The virtual output interface as recited in claim 9, wherein said virtual output converting means comprises a virtual output manager process responsive to said one or more processed picture elements for coupling said one or more processed picture elements to said at least one physical output device. 13. The virtual output interface as recited in claim 9, whcrein said at lcast onc physical device can bc removed from said system without affecting the operation of the remainder of said system. 14. The virtual output interface as recited in claim 9, wherein at least one additional physical device can be added to said system without affecting the operation of the remainder of said system. 15. In a data processing system, an interface between processes and data in said system and physical input and output devices coupled to said system, said interface comprising: mcans rcsponsivc to one of said physical input deviccs for generating a picture, said picture comprising one or more picture elements, each picture element comprising a plurality of device-independent data structures in a predetermined, standard data format, at least one of said data structures comprising a plurality of different data fields each containing information describing said picture element; means for performing processing operations on said one or more picture elements; and means responsive to said one or more processed picture elements for coupling said one or more processed picture elements to one of said physical output devices. 16. The data processing system as recited in claim 15, wherein said one or more picture elements define a graphical object and at least one attribute thereof. 17. The data processing system as recited in claim 16, wherein one of said data fields describes the length of the associated picture clement. 18. The data processing system as recited in claim 16, wherein one of said data fields identifies the particular type of the associated picture element. 19. The data processing system as recited in claim 16, wherein one of said data fields describes the position of the associated picture element relative to row and column coordinates on a picture of which said picturc clcmcnt forms a part. 20_ The data processing system as recited in claim 16, wherein one of said data fields describes the size of the associated picture element. 21. The data processing system as recited in claim 16, wherein one of said data fields describes the color of the associated picture element. 22. The data processing system as recited in claim 15, wherein said means responsive to one of said physical input devices comprises a virtual input manager process. 23. The data processing system as recited in claim 15, wherein said means responsive to said one or more processed picture elements comprises a virtual output manager process. * * * * * MS-MOTO_SDFLA_00000010591

Disclaimer: Justia Dockets & Filings provides public litigation records from the federal appellate and district courts. These filings and docket sheets should not be considered findings of fact or liability, nor do they necessarily reflect the view of Justia.


Why Is My Information Online?