-+-+-+-+-+-+-+-+ START OF PART 108 -+-+-+-+-+-+-+-+ X371 2 v 0 588 a Fq(Ppoint3)f Fp(ptk_vec3topt3)g Fq(\()i(Pvector3)f(*)p XFa(vec)f Fq(\))25 687 y(IN)50 b(Pvector3)11 b(*)49 b Fa(vec)g XFq(3D)11 b(vector)n(.)0 787 y(This)g(function)f(convert)h(the)g(3D)g(vector) Vg XFi(vec)h Fq(to)f(a)h(3D)f(point.)p 1582 884 284 2 v 1582 963 X2 80 v 1596 938 a Fb(ptk_vector)p 1864 963 V 1582 965 284 2 Xv 0 1039 a Fq(Pvector)g Fp(ptk_vector)h Fq(\()f(P\257oat)h XFa(x)p Fq(,)f(P\257oat)g Fa(y)g Fq(\))25 1128 y(IN)50 b(P\257oat)f XFa(x)h Fq(x)11 b(coordinate.)25 1178 y(IN)50 b(P\257oat)f Fa(y)h XFq(y)11 b(coordinate.)0 1253 y(This)g(function)f(returns)h(a)h(structure)e X(representing)h(the)g(2D)g(vector)g Fi(\(x,y\))p Fq(.)p 1552 X1350 314 2 v 1552 1429 2 80 v 1566 1404 a Fb(ptk_vector3)p X1864 1429 V 1552 1431 314 2 v 0 1505 a Fq(Pvector3)g Fp(ptk_vector3)h XFq(\()f(P\257oat)g Fa(x)p Fq(,)h(P\257oat)f Fa(y)p Fq(,)g(P\257oat)h XFa(z)f Fq(\))25 1594 y(IN)50 b(P\257oat)f Fa(x)h Fq(x)11 b(coordinate.)25 X1644 y(IN)50 b(P\257oat)f Fa(y)h Fq(y)11 b(coordinate.)25 1694 Xy(IN)50 b(P\257oat)f Fa(z)h Fq(z)12 b(coordinate.)0 1762 y(This)f(function)f X(returns)h(a)h(structure)e(representing)h(the)g(3D)g(vector)g XFi(\(x,y,z\))p Fq(.)0 2956 y(13th)22 b(May)m(,)12 b(1992)636 Xb(82)839 b(2.01)p eop X%%Page: 83 84 Xbop 0 349 a Fj(Chapter)24 b(14)0 585 y Fs(Hashstrings)29 b(functions)0 X855 y Fr(14.1)59 b(Data)17 b(types)54 977 y Fi(typedef)i(struct)108 X1027 y(`7B)126 1076 y(Pint)g(listlen;)126 1126 y(Pint)g(*stidlist;)126 X1176 y(Pint)g(*strlenlist;)126 1226 y(Pchar)g(**strlist;)126 X1276 y(`7D)f(ptksstringtable;)72 1375 y(typedef)h(struct)108 X1425 y(`7B)126 1475 y(Pint)g(listlen;)126 1525 y(Pint)g(*namelenlist;)126 X1575 y(Pchar)g(**tablenames;)108 1624 y(`7D)f(ptkstablelist;)0 X1793 y Fr(14.2)59 b(Functions)p 1363 1884 503 2 v 1363 1963 X2 80 v 1377 1938 a Fb(ptk_createhasht)o(abl)o(e)p 1864 1963 XV 1363 1965 503 2 v 0 2039 a Fq(void)10 b Fp(ptk_cr)o(eatehashtable)j XFq(\()e(Pchar)h(*)p Fa(tablestr)p Fq(,)d(Pint)h Fa(minint)p XFq(,)h(Pint)g Fa(maxint)f Fq(\))25 2128 y(IN)50 b(Pchar)11 Xb(*)50 b Fa(tablestr)e Fq(hashtable)11 b(name.)25 2178 y(IN)50 Xb(Pint)108 b Fa(minint)71 b Fq(lower)10 b(limit)g(of)h(string-integer)e X(range.)25 2228 y(IN)50 b(Pint)108 b Fa(maxint)61 b Fq(upper)10 Xb(limit)g(of)h(string-integer)e(range.)0 2297 y(This)k(function)e(creates)k X(a)e(new)h(hashtable,)f(with)f(the)h(name)h Fi(tablestr)p Fq(.)22 Xb Fi(minint)14 b Fq(and)g Fi(maxint)g Fq(respectively)e(specify)h(the)0 X2347 y(lower)e(and)g(upper)g(limits)f(of)h(the)g(range)h(of)f(integers)g(to) Vg X(which)f(strings)h(hashed)g(into)f(the)h(hashtable)h(will)e(be)h(mapped.)912 X2956 y(83)p eop X%%Page: 84 85 Xbop 0 -137 a Fq(PHIGS)11 b(T)m(oolkit)f(User)i(Manual)1235 Xb(PTK/100)p 1433 -19 434 2 v 1433 60 2 80 v 1447 35 a Fb(ptk_delhashtabl)o(e V) Xp 1864 60 V 1433 62 434 2 v 0 136 a Fq(ptkboolean)10 b Fp(ptk_delhashtable)h XFq(\()g(Pchar)h(*)p Fa(tablestr)d Fq(\))25 236 y(IN)50 b(Pchar)11 Xb(*)50 b Fa(tablestr)e Fq(name)12 b(of)f(table)g(to)g(be)g(deleted.)0 X335 y(This)h(function)e(deletes)i(hastable)g Fi(tablestr)i XFq(from)d(the)h(table)f(of)h(hashtables,)g(returning)e(TRUE)j(if)e(the)h X(table)f(was)i(deleted,)0 385 y(otherwise)e(F)m(ALSE.)p 1522 X482 344 2 v 1522 561 2 80 v 1537 536 a Fb(ptk_delstring)p 1864 X561 V 1522 563 344 2 v 0 637 a Fq(ptkboolean)f Fp(ptk_delstring)h XFq(\()g(Pchar)h(*)p Fa(tablestr)p Fq(,)d(Pchar)j(*)p Fa(delstr)e XFq(\))25 726 y(IN)50 b(Pchar)11 b(*)50 b Fa(tablestr)e Fq(name)12 Xb(of)f(hashtable.)25 776 y(IN)50 b(Pchar)11 b(*)50 b Fa(delstr)78 Xb Fq(string)10 b(to)g(be)i(deleted)f(from)g(string)f(table.)0 X851 y(This)k(function)f(deletes)i(the)f(string)f Fi(delstr)j XFq(from)e(hashtable)g Fi(tablestr)p Fq(.)26 b(The)16 b(result)d(of)h(the)h X(function)d(is)j(TRUE)g(if)e(the)0 901 y(string)d(was,)i(otherwise)f(F)m X(ALSE.)p 1396 998 470 2 v 1396 1077 2 80 v 1410 1052 a Fb(ptk_hashtableused) Vp X1864 1077 V 1396 1079 470 2 v 0 1153 a Fq(ptkboolean)f Fp(ptk_hashtableused) Vh XFq(\()h(Pchar)g(*)p Fa(str)e Fq(\))25 1253 y(IN)50 b(Pchar)11 Xb(*)50 b Fa(str)f Fq(name)12 b(of)f(hashtable.)0 1352 y(This)16 Xb(function)f(checks)j(if)e(a)g(hashtable)h(named)g Fi(str)g XFq(already)g(exists)f(in)g(the)g(table)g(of)g(hashtables,)i(returning)d(TRUE V) Xi(if)0 1402 y(the)11 b(hashtable)g(exists,)h(otherwise)f(F)m(ALSE.)p X1403 1499 464 2 v 1403 1579 2 80 v 1417 1553 a Fb(ptk_inithashtabl)o(es)p X1864 1579 V 1403 1581 464 2 v 0 1655 a Fq(void)f Fp(ptk_inithashtables)g XFq(\()h(void)22 b(\))0 1804 y(This)14 b(function)g(initialises)e(the)j(table V) Xf(in)g(which)g(the)h(details)f(of)g(hashtables)h(created)g(by)f(the)h X(application)e(are)i(kept.)25 b(This)0 1854 y(function)10 b(must)h(be)h X(called)f(before)h(any)f(other)g(hashtable)g(functions.)p 1406 X1951 460 2 v 1406 2030 2 80 v 1420 2005 a Fb(ptk_inqhashtables)p X1864 2030 V 1406 2032 460 2 v 0 2106 a Fq(void)f Fp(ptk_inqhashtables)h XFq(\()k(Pint)f Fa(size)p Fq(,)h(Pint)f(*)p Fa(totalsize)p Fq(,)g(Pchar)h(*)p XFa(strbuf)o(fer)p Fq(,)f(ptkstablelist)422 2156 y(*)p Fa(tablerec)9 Xb Fq(\))25 2206 y(IN)91 b(Pint)215 b Fa(size)115 b Fq(number)11 Xb(of)g(bytes)g(allocated)g(for)g(the)g(hashtable)h(data..)25 X2256 y(OUT)50 b(Pint)10 b(*)184 b Fa(totalsize)47 b Fq(actual)11 Xb(number)h(of)f(bytes)g(required)f(for)h(hashtable)g(data..)25 X2306 y(OUT)50 b(Pchar)12 b(*)156 b Fa(strbuf)o(fer)48 b Fq(pointer)10 Xb(to)h(buf)o(fer)g(for)g(hashtable)g(data.)25 2356 y(OUT)50 Xb(ptkstablelist)9 b(*)50 b Fa(tablerec)h Fq(hash)11 b(table)h(data..)0 X2425 y(This)f(function)g(returns)f(in)h(the)h(user)g(speci\256ed)g(buf)o(fer V) Xf Fi(strbuffer)i Fq(the)f(names)h(of)e(each)i(hashtable)e(contained)g(in)g X(the)g(table)0 2475 y(of)g(hashtables.)0 2956 y(13th)22 b(May)m(,)12 Xb(1992)636 b(84)839 b(2.01)p eop X%%Page: 85 86 Xbop 0 -137 a Fq(PHIGS)11 b(T)m(oolkit)f(User)i(Manual)1235 Xb(PTK/100)p 1496 -19 371 2 v 1496 60 2 80 v 1510 35 a Fb(ptk_inqstrings)p X1864 60 V 1496 62 371 2 v 0 136 a Fq(void)10 b Fp(ptk_inqstrings)h XFq(\()d(Pchar)h(*)p Fa(tablestr)p Fq(,)e(Pint)g Fa(size)p Fq(,)h(Pint)f(*)p XFa(totalsize)p Fq(,)f(Pchar)j(*)p Fa(strbuf)o(fer)p Fq(,)355 X186 y(ptksstringtable)g(*)p Fa(strtable)g Fq(\))25 238 y(IN)91 Xb(Pchar)12 b(*)199 b Fa(tablestr)62 b Fq(name)12 b(of)f(hashtable.)25 X288 y(IN)91 b(Pint)258 b Fa(size)116 b Fq(number)11 b(of)g(bytes)g(allocated V) Xg(by)g(the)g(user)h(for)f(string)f(table)h(data..)25 338 y(OUT)50 Xb(Pint)10 b(*)227 b Fa(totalsize)48 b Fq(actual)11 b(size)h(of)f(buf)o(fer)g X(required)g(for)g(string)f(table)h(data..)25 387 y(OUT)50 b(Pchar)12 Xb(*)199 b Fa(strbuf)o(fer)49 b Fq(application)10 b(supplied)g(buf)o(fer)h X(for)g(string)f(table)h(data.)25 437 y(OUT)50 b(ptksstringtable)9 Xb(*)49 b Fa(strtable)62 b Fq(struct)10 b(containing)g(length)g(of)h(arrays)h X(and)f(pointer)f(to)h(data)h(in)e(strbuf)o(fer)n(..)0 506 y(This)k(function) Vf X(is)h(used)g(to)g(interogate)f(hashtable)h Fi(tablestr)p Fq(.)26 Xb(A)14 b(list)f(of)h(the)g Fi(size)h Fq(strings)e(contained)h(in)f(the)h X(hashtable)0 556 y(are)e(returned)e(in)g(the)g(user)h(speci\256ed)h(buf)o X(fer)e Fi(strbuffer)p Fq(,)j(together)d(with)g(their)g(corresponding)f X(string)g(lengths)h(and)h(integer)0 606 y(hash)h(values.)p X1486 703 381 2 v 1486 782 2 80 v 1500 757 a Fb(ptk_inttostring)p X1864 782 V 1486 784 381 2 v 0 858 a Fq(void)e Fp(ptk_inttostring)g XFq(\()f(Pchar)h(*)p Fa(tablestr)p Fq(,)e(Pint)g Fa(stint)p XFq(,)h(Pint)g Fa(size)p Fq(,)f(Pchar)i(*)p Fa(strbuf)o(fer)p XFq(,)e(Pint)364 908 y(*)p Fa(buf)o(fersize)h Fq(\))25 958 y(IN)91 Xb(Pchar)12 b(*)50 b Fa(tablestr)84 b Fq(hashtable)11 b(name.)25 X1008 y(IN)91 b(Pint)109 b Fa(stint)136 b Fq(string)10 b(identi\256er)g(to)h X(search)h(hashtable)f(for)n(.)25 1058 y(IN)91 b(Pint)109 b XFa(size)138 b Fq(number)11 b(of)g(bytes)g(allocated)g(by)g(the)g(user)h(for) Vf X(the)g(string.)25 1108 y(OUT)50 b(Pchar)12 b(*)50 b Fa(strbuf)o(fer)71 Xb Fq(pointer)10 b(to)g(space)j(allocated)e(by)g(the)g(user)h(for)f(the)g X(string.)25 1158 y(OUT)50 b(Pint)10 b(*)78 b Fa(buf)o(fersize)47 Xb Fq(actual)11 b(size)h(of)f(buf)o(fer)g(required.)0 1227 y(This)h(function) Vf X(returns)h(the)h(string)e(in)h(hashtable)g Fi(tablestr)i Fq(which)e(has)h X(been)g(allocated)g(the)f(integer)g Fi(stint)p Fq(.)20 b(The)14 Xb(string)0 1276 y(is)e(returned)f(in)h(the)g(buf)o(fer)f Fi(strbuffer)p XFq(,)k(which)c(must)h(be)h(allocated)f(by)f(the)h(application.)k(The)d X(number)f(of)g(bytes)g(actually)0 1326 y(used)g(in)e(the)h(buf)o(fer)g(is)h X(returned)e(in)h Fi(buffersize)p Fq(,)i(as)f(the)g(length)e(of)h(string)f(+) Vi X(1)f(\(for)f(`60)0 1376 y(0')h(character\),)i(or)e(0)g(if)g(no)g(string)f(wa Vs)i X(returned.)p 1260 1473 606 2 v 1260 1552 2 80 v 1274 1527 a XFb(ptk_restoreallha)o(shtabl)o(es)p 1864 1552 V 1260 1554 606 X2 v 0 1628 a Fq(void)e Fp(ptk_r)o(estor)o(eallhashtables)i XFq(\()f(FILE)h(*)p Fa(\256leptr)e Fq(\))25 1728 y(IN)50 b(FILE)12 Xb(*)49 b Fa(\256leptr)f Fq(pointer)10 b(to)h(a)h(\256le.)0 X1827 y(This)h(function)e(restores)i(all)f(hashtables)h(from)g(a)g(\256le.)20 Xb(Ef)o(fectively)m(,)14 b Fi(ptk_restorehashtable)i Fq(\(q.v)m(.\))k(is)13 Xb(called)g(for)f(each)0 1877 y(hashtable)f(in)g(the)g(\256le.)16 Xb(The)c(\256le)f(should)f(be)i(open)f(and)g(readable)h(when)g(this)e X(function)g(is)h(called.)p 1343 1974 523 2 v 1343 2054 2 80 Xv 1357 2028 a Fb(ptk_restorehashtabl)o(e)p 1864 2054 V 1343 X2056 523 2 v 0 2130 a Fq(void)f Fp(ptk_r)o(estor)o(ehashtable)j XFq(\()e(FILE)h(*)p Fa(\256leptr)p Fq(,)e(Pchar)i(*)p Fa(tablestr)d XFq(\))25 2218 y(IN)50 b(FILE)12 b(*)56 b Fa(\256leptr)78 b XFq(pointer)10 b(to)g(a)i(\256le.)25 2268 y(IN)50 b(Pchar)11 Xb(*)50 b Fa(tablestr)e Fq(hashtable)11 b(to)f(insert)h(data)h(from)f(\256le. V) X0 2343 y(This)h(function)e(reads)j(a)f(hashtable)g(from)f(the)h(\256le)g XFi(fileptr)p Fq(,)i(and)e(creates)h(it)e(with)g(the)h(name)g XFi(tablestr)p Fq(.)19 b(If)12 b(the)f(hashtable)0 2393 y(already)j(exists,)h X(it)f(is)f(deleted,)j(and)e(then)g(recreated)h(from)f(the)g(\256le.)24 Xb(The)15 b(\256le)f(should)f(be)h(open)g(and)g(readable)h(when)f(this)0 X2443 y(function)c(is)h(called.)0 2956 y(13th)22 b(May)m(,)12 Xb(1992)636 b(85)839 b(2.01)p eop X%%Page: 86 87 Xbop 0 -137 a Fq(PHIGS)11 b(T)m(oolkit)f(User)i(Manual)1235 Xb(PTK/100)p 1307 -19 560 2 v 1307 60 2 80 v 1321 35 a Fb(ptk_storeallha)o X(shtabl)o(es)p 1864 60 V 1307 62 560 2 v 0 136 a Fq(void)10 Xb Fp(ptk_stor)o(eallhashtables)h Fq(\()g(FILE)h(*)p Fa(\256leptr)e XFq(\))25 236 y(IN)50 b(FILE)12 b(*)49 b Fa(\256leptr)f Fq(pointer)10 Xb(to)h(a)h(\256le.)0 335 y(The)j(function)e(writes)g(all)h(the)g(hashtables) Vh X(in)e(the)i(table)f(of)g(hashtables)g(to)g(the)g(\256le)g Fi(fileptr)p XFq(,)j(which)d(should)f(be)h(opened)0 385 y(and)d(writeable.)p X1390 482 477 2 v 1390 561 2 80 v 1404 536 a Fb(ptk_storehashtabl)o(e)p X1864 561 V 1390 563 477 2 v 0 637 a Fq(void)f Fp(ptk_stor)o(ehashtable)i XFq(\()f(FILE)h(*)p Fa(\256leptr)p Fq(,)e(Pchar)i(*)p Fa(tablestr)d XFq(\))25 726 y(IN)50 b(FILE)12 b(*)56 b Fa(\256leptr)48 b Fq(pointer)10 Xb(to)h(a)h(\256le.)25 776 y(IN)50 b(Pchar)11 b(*)50 b Fa(table)58 Xb Fq(hashtable)11 b(to)g(store.)0 851 y(The)h(function)e(writes)h(the)g X(hashtable)g Fi(tablestr)i Fq(to)d(the)i(\256le)f Fi(fileptr)p XFq(,)i(which)e(should)f(be)i(opened)f(and)g(writeable.)p 1486 X948 381 2 v 1486 1027 2 80 v 1500 1002 a Fb(ptk_stringtoint)p X1864 1027 V 1486 1029 381 2 v 0 1103 a Fq(Pint)f Fp(ptk_stringtoint)g XFq(\()i(Pchar)f(*)p Fa(tablestr)p Fq(,)f(Pchar)i(*)p Fa(str)e XFq(\))25 1192 y(IN)50 b(Pchar)11 b(*)50 b Fa(tablestr)e Fq(name)12 Xb(of)f(hashtable.)25 1242 y(IN)50 b(Pchar)11 b(*)50 b Fa(str)126 Xb Fq(string)10 b(to)g(be)i(searched)g(for)f(in)g(string)f(table.)0 X1317 y(This)k(function)f(returns)h(the)g(integer)g(allocated)h(for)e(the)i X(string)e Fi(str)i Fq(in)f(hashtable)g Fi(tablestr)p Fq(.)26 Xb(If)15 b(the)f(string)f(has)i(not)e(al-)0 1367 y(ready)f(been)f(allocated)h X(an)f(integer)n(,)h(then)f(it)f(is)h(allocated)g(one)h(and)f(this)g(value)g X(is)g(returned.)p 1486 1464 V 1486 1543 2 80 v 1500 1518 a XFb(ptk_stringused)p 1864 1543 V 1486 1545 381 2 v 0 1619 a XFq(ptkboolean)f Fp(ptk_stringused)i Fq(\()f(Pchar)h(*)p Fa(tablestr)p XFq(,)d(Pchar)j(*)p Fa(str)e Fq(\))25 1708 y(IN)50 b(Pchar)11 Xb(*)50 b Fa(tablestr)e Fq(name)12 b(of)f(hashtable.)25 1758 Xy(IN)50 b(Pchar)11 b(*)50 b Fa(str)126 b Fq(string)10 b(to)g(search)j(for)d X(in)h(string)f(table.)0 1833 y(This)i(function)f(checks)i(if)f(the)g(string) Vf XFi(str)i Fq(has)g(already)g(been)g(used)f(in)g(hashtable)g XFi(tablestr)p Fq(,)i(Returning)d(TRUE)i(if)f(string)0 1883 Xy(was)g(used)f(in)g(the)g(hashtable,)h(otherwise)f(F)m(ALSE.)0 X2956 y(13th)22 b(May)m(,)12 b(1992)636 b(86)839 b(2.01)p eop X%%Page: 87 88 Xbop 0 349 a Fj(Chapter)24 b(15)0 585 y Fs(PHIGS)30 b(Utilities)d(Library)h X(functions)0 855 y Fr(15.1)59 b(Data)17 b(types)54 977 y Fi(typedef)i(struct V) X108 1027 y(`7B)126 1076 y(Peltype)g(eltype;)126 1126 y(Pint)g(size;)126 X1176 y(Peldata)g(eldata;)108 1226 y(`7D)f(ptkselcontent;)0 1395 Xy Fr(15.2)59 b(Functions)p 1592 1486 274 2 v 1592 1565 2 80 Xv 1606 1540 a Fb(ptk_arrow)p 1864 1565 V 1592 1567 274 2 v X0 1641 a Fq(void)10 b Fp(ptk_arr)o(ow)i Fq(\()g(P\257oat)g XFa(length)p Fq(,)e(P\257oat)i Fa(width)p Fq(,)g(Ppoint3)e(*)p XFa(centre)p Fq(,)h(P\257oat)h Fa(angle)285 1691 y Fq(\))25 X1741 y(IN)50 b(P\257oat)114 b Fa(length)50 b Fq(length)10 b(of)h(arrow)m(.)2 V5 X1791 y(IN)50 b(P\257oat)114 b Fa(width)65 b Fq(width)10 b(of)h(arrow)m(.)25 X1841 y(IN)50 b(Ppoint3)9 b(*)50 b Fa(centre)e Fq(centre)11 Xb(of)g(arrow)m(.)25 1891 y(IN)50 b(P\257oat)114 b Fa(angle)60 Xb Fq(rotation)9 b(of)i(arrow)g(in)g(degrees)h(anti-clockwise)f(about)f(arrow V) Xi(pointing)c(along)j(x-axis..)0 1960 y(This)17 b(function)e(draws)i(an)g X(arrow)g(with)f(the)g(speci\256ed)i(length)e Fi(length)i Fq(and)f XFi(width)p Fq(,)i(rotated)d(through)f Fi(angle)p Fq(,)20 b(centred)0 X2009 y(at)11 b Fi(centre)p Fq(.)p 1283 2107 583 2 v 1283 2186 X2 80 v 1297 2160 a Fb(ptk_changepostpriorit)o(y)p 1864 2186 XV 1283 2188 583 2 v 0 2262 a Fq(void)f Fp(ptk_changepostpriority)h XFq(\()g(Pint)g Fa(ws)p Fq(,)h(Pint)f Fa(structid)p Fq(,)e(Pvpri)i XFa(relpriority)p Fq(,)e(Pint)i Fa(relstruct)p Fq(,)e(Pint)514 X2311 y(*)p Fa(error)h Fq(\))25 2362 y(IN)91 b(Pint)81 b Fa(ws)152 Xb Fq(workstation)9 b(identi\256er)n(.)25 2412 y(IN)91 b(Pint)81 Xb Fa(structid)e Fq(structure)10 b(identi\256er)n(.)25 2462 Xy(IN)91 b(Pvpri)58 b Fa(relpriority)47 b Fq(relative)11 b(priority)m(.)25 X2511 y(IN)91 b(Pint)81 b Fa(relstruct)67 b Fq(relative)11 b(structure)f X(identi\256er)n(.)25 2561 y(OUT)50 b(Pint)10 b(*)50 b Fa(error)119 Xb Fq(error)11 b(code.)0 2630 y(This)e(function)f(changes)i(the)f(priority)e +-+-+-+-+-+-+-+- END OF PART 108 +-+-+-+-+-+-+-+-