summaryrefslogtreecommitdiff
path: root/dviware/beebe/src/clrbmap.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /dviware/beebe/src/clrbmap.h
Initial commit
Diffstat (limited to 'dviware/beebe/src/clrbmap.h')
-rw-r--r--dviware/beebe/src/clrbmap.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/dviware/beebe/src/clrbmap.h b/dviware/beebe/src/clrbmap.h
new file mode 100644
index 0000000000..33033fc186
--- /dev/null
+++ b/dviware/beebe/src/clrbmap.h
@@ -0,0 +1,53 @@
+/* -*-C-*- clrbmap.h */
+/*-->clrbmap*/
+/**********************************************************************/
+/****************************** clrbmap *******************************/
+/**********************************************************************/
+
+void
+clrbmap()
+
+{
+#if SEGMEM
+ register INT16 x,y; /* loop indices */
+ register UNSIGN32 *p; /* bitmap pointer */
+
+ for (y = 0; y < YBIT; ++y)
+ {
+ p = (UNSIGN32*)BITMAP(y,0);
+
+#if FASTZERO
+ (void)zerom(p,(UNSIGN32)(XBIT));
+#else
+ for (x = 0; x < XBIT; (++p,++x))
+ *p = (UNSIGN32)0;
+#endif
+
+ }
+
+#else /* NOT SEGMEM */
+#if FASTZERO
+
+/***********************************************************************
+Fast assembly language clear -- runtime histogramming showed 24% of
+total time was spent in this routine for the large bitmap required by
+the Toshiba P1315 180 dpi dvi driver!
+***********************************************************************/
+ (void)zerom(bitmap,(UNSIGN32)(XBIT*YBIT));
+
+#else /* NOT FASTZERO */
+
+
+ register INT32 nword; /* loop index */
+ register UNSIGN32 *p; /* bitmap pointer */
+
+ p = (UNSIGN32*)BITMAP(YBIT-1,XBIT-1); /* the last element */
+
+ for (nword = (XBIT*YBIT); nword; (--nword,--p))
+ *p = (UNSIGN32)0;
+
+#endif /* FASTZERO */
+
+#endif /* SEGMEM */
+}
+