home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / x / x11p-13.zip / RCS / do_simple.c,v < prev    next >
Text File  |  1989-12-14  |  4KB  |  238 lines

  1. head     2.3;
  2. access   ;
  3. symbols  pre-merge:2.0;
  4. locks    ; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 2.3
  9. date     89.12.07.16.35.27;  author joel;  state Exp;
  10. branches ;
  11. next     2.2;
  12.  
  13. 2.2
  14. date     89.05.11.16.44.48;  author joel;  state Exp;
  15. branches ;
  16. next     2.1;
  17.  
  18. 2.1
  19. date     89.05.03.14.18.01;  author joel;  state Exp;
  20. branches ;
  21. next     2.0;
  22.  
  23. 2.0
  24. date     88.06.10.13.35.07;  author erik;  state Exp;
  25. branches ;
  26. next     1.1;
  27.  
  28. 1.1
  29. date     88.06.10.13.35.07;  author joel;  state Exp;
  30. branches ;
  31. next     ;
  32.  
  33.  
  34. desc
  35. @@
  36.  
  37.  
  38. 2.3
  39. log
  40. @Changed interface to p->reps
  41. @
  42. text
  43. @/*****************************************************************************
  44. Copyright 1988, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
  45.  
  46.                         All Rights Reserved
  47.  
  48. Permission to use, copy, modify, and distribute this software and its 
  49. documentation for any purpose and without fee is hereby granted, 
  50. provided that the above copyright notice appear in all copies and that
  51. both that copyright notice and this permission notice appear in 
  52. supporting documentation, and that the name of Digital not be
  53. used in advertising or publicity pertaining to distribution of the
  54. software without specific, written prior permission.  
  55.  
  56. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  57. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  58. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  59. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  60. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  61. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  62. SOFTWARE.
  63.  
  64. ******************************************************************************/
  65.  
  66. #ifndef VMS
  67. #include <X11/Xatom.h>
  68. #else
  69. #include <decw$include/Xatom.h>
  70. #endif
  71.  
  72. #include "x11perf.h"
  73.  
  74. static Atom XA_PK_TEMP;
  75. static Window root;
  76.  
  77. void DoNoOp(xp, p, reps)
  78.     XParms  xp;
  79.     Parms   p;
  80.     int     reps;
  81. {
  82.     int     i;
  83.  
  84.     for (i = 0; i != reps; i++) {
  85.     XNoOp(xp->d);
  86.     }
  87. }
  88.  
  89.  
  90. void DoGetAtom(xp, p, reps)
  91.     XParms  xp;
  92.     Parms   p;
  93.     int     reps;
  94. {
  95.     char    *atom;
  96.     int     i;
  97.  
  98.     for (i = 0; i != reps; i++) {
  99.     atom = XGetAtomName (xp->d, 1);
  100.     }
  101. }
  102.  
  103. int InitGetProperty(xp, p, reps)
  104.     XParms  xp;
  105.     Parms   p;
  106.     int     reps;
  107. {
  108.     int foo = 41;
  109.  
  110.     root = RootWindow (xp->d, 0);
  111.     XA_PK_TEMP = XInternAtom (xp->d, "_PK_TEMP", False);
  112.     XChangeProperty (
  113.         xp->d, root, XA_PK_TEMP, XA_INTEGER, 32,
  114.         PropModeReplace, &foo, sizeof (int));
  115.     return reps;
  116. }
  117.  
  118. void DoGetProperty(xp, p, reps)
  119.     XParms  xp;
  120.     Parms   p;
  121.     int     reps;
  122. {
  123.     char   *atom;
  124.     int     i, status;
  125.     int     prop, actual_format, actual_length, bytes_remaining;
  126.     Atom actual_type;
  127.  
  128.     for (i = 0; i != reps; i++) {
  129.     status = XGetWindowProperty (
  130.         xp->d, root, XA_PK_TEMP, 0, sizeof (int),
  131.         False, AnyPropertyType, &actual_type, &actual_format,
  132.         &actual_length, &bytes_remaining, &prop);
  133.     }
  134. }
  135. @
  136.  
  137.  
  138. 2.2
  139. log
  140. @Parameters to all routines now (xp, p)
  141. MAXROWS used in all routines
  142. Junked most global communication variables
  143. @
  144. text
  145. @d35 1
  146. a35 1
  147. void DoNoOp(xp, p)
  148. d38 1
  149. d42 1
  150. a42 1
  151.     for (i = 0; i != p->reps; i++) {
  152. d48 1
  153. a48 1
  154. void DoAtom(xp, p)
  155. d51 1
  156. d56 1
  157. a56 1
  158.     for (i = 0; i != p->reps; i++) {
  159. d61 1
  160. a61 1
  161. Bool InitGetProp(xp, p)
  162. d64 1
  163. d73 1
  164. a73 1
  165.     return True;
  166. d76 1
  167. a76 1
  168. void DoGetProp(xp, p)
  169. d79 1
  170. d86 1
  171. a86 1
  172.     for (i = 0; i != p->reps; i++) {
  173. @
  174.  
  175.  
  176. 2.1
  177. log
  178. @Massive changes, I'm not going to go into details.
  179. @
  180. text
  181. @d1 23
  182. d33 1
  183. d35 3
  184. a37 3
  185. void DoAtom(d, p)
  186.     Display *d;
  187.     Parms p;
  188. a38 1
  189.     char   *atom;
  190. d41 2
  191. a42 2
  192.     for (i = 0; i < p->reps; i++) {
  193.     atom = XGetAtomName (d, 1);
  194. d46 4
  195. a49 3
  196. Bool InitGetProp(d, p)
  197.     Display *d;
  198.     Parms p;
  199. d51 12
  200. d65 2
  201. a66 1
  202.     XA_PK_TEMP = XInternAtom (d, "_PK_TEMP", False);
  203. d68 1
  204. a68 1
  205.         d, root, XA_PK_TEMP, XA_INTEGER, 32,
  206. d73 3
  207. a75 3
  208. void DoGetProp(d, p)
  209.     Display *d;
  210.     Parms p;
  211. d82 1
  212. a82 1
  213.     for (i = 0; i < p->reps; i++) {
  214. d84 1
  215. a84 1
  216.         d, root, XA_PK_TEMP, 0, sizeof (int),
  217. @
  218.  
  219.  
  220. 2.0
  221. log
  222. @version from /usr/src/pmax
  223. @
  224. text
  225. @d23 1
  226. a23 1
  227. void InitGetProp(d, p)
  228. d33 1
  229. @
  230.  
  231.  
  232. 1.1
  233. log
  234. @Initial revision
  235. @
  236. text
  237. @@
  238.