Article 2733 of comp.sources.unix:
Path: nntpd.lkg.dec.com!crl.dec.com!crl.dec.com!caen!usenet.cis.ufl.edu!usenet.eel.ufl.edu!gatech!newsfeed.internetmci.com!in1.uu.net!vixie!vixie!not-for-mail
From: glover@credit.erin.utoronto.ca (Mike Glover)
Newsgroups: comp.sources.unix
Subject: v29i078: cdk - curses development kit, V4.6.0, Part05/09
Date: 12 Jan 1996 16:30:53 -0800
Organization: Vixie Enterprises
Lines: 2356
Sender: vixie@vix.com
Approved: vixie@gw.home.vix.com
Message-ID: <4d6uft$90g@gw.home.vix.com>
References: <1.821493023.9103@gw.home.vix.com>
NNTP-Posting-Host: gw.home.vix.com

Submitted-By: glover@credit.erin.utoronto.ca (Mike Glover)
Posting-Number: Volume 29, Issue 78
Archive-Name: cdk-4.6.0/part05

#!/bin/sh
# This is `part05' (part 5 of a multipart archive).
# Do not concatenate these parts, unpack them in order with `/bin/sh'.
# File `cdk-4.6.0/entry.c' is being continued...
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  echo 'WARNING: not restoring timestamps.  Consider getting and'
  echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if test ! -r _sharseq.tmp; then
  echo 'Please unpack part 1 first!'
  exit 1
fi
shar_sequence=`cat _sharseq.tmp`
if test "$shar_sequence" != 5; then
  echo "Please unpack part $shar_sequence next!"
  exit 1
fi
if test ! -f _sharnew.tmp; then
  echo 'x - still skipping cdk-4.6.0/entry.c'
else
  echo 'x - continuing file cdk-4.6.0/entry.c'
  sed 's/^X//' << 'SHAR_EOF' >> '_sharuue.tmp' &&
XM("!["B`@("`@("`@("`@('!L86EN8VAA<B`]('1O;&]W97(@*'!L86EN8VAA
XM<BD["B`@("`@("`@('T*"B`@("`@("`@("\J(%5P9&%T92!T:&4@<V-R965N
XM(&%N9"!P;VEN=&5R+@D)"0DJ+PH@("`@("`@("!I9B`H(&5N=')Y+3YS8W)E
XM96YC;VP@(3T@96YT<GDM/F9I96QD=VED=&@M,2D*("`@("`@("`@>PH@("`@
XM("`@("`@("`O*B!5<&1A=&4@=&AE(&-H87)A8W1E<B!P;VEN=&5R+@D)"0DJ
XM+PH@("`@("`@("`@("!T96UP(#T@*&EN="ES=')L96X@*&5N=')Y+3YI;F9O
XM*3L*("`@("`@("`@("`@9F]R("AX/71E;7`[('@@/B!E;G1R>2T^<V-R965N
XM8V]L*V5N=')Y+3YL969T8VAA<CL@>"TM*0H@("`@("`@("`@("!["B`@("`@
XM("`@("`@("`@(&5N=')Y+3YI;F9O6WA=(#T@96YT<GDM/FEN9F];>"TQ73L*
XM("`@("`@("`@("`@?0H@("`@("`@("`@("!E;G1R>2T^:6YF;UL@96YT<GDM
XM/G-C<F5E;F-O;"ME;G1R>2T^;&5F=&-H87)=(#T@<&QA:6YC:&%R.PH*("`@
XM("`@("`@("`@+RH@57!D871E('1H92!S8W)E96XN"0D)"0DJ+PH@("`@("`@
XM("`@("!I9B`H"65N=')Y+3YD:7-P='EP92`]/2!V2$E.5"!\?"!E;G1R>2T^
XM9&ES<'1Y<&4@/3T@=DA#2$%2('Q\(%P*"0D)96YT<GDM/F1I<W!T>7!E(#T]
XM('9(34E8140@?'P@96YT<GDM/F1I<W!T>7!E(#T]('952$-(05(@?'P@7`H)
XM"0EE;G1R>2T^9&ES<'1Y<&4@/3T@=DQ(0TA!4B!\?"!E;G1R>2T^9&ES<'1Y
XM<&4@/3T@=E5(34E8140@?'P@7`H)"0EE;G1R>2T^9&ES<'1Y<&4@/3T@=DQ(
XM34E8140@*0H@("`@("`@("`@("!["B`@("`@("`@("`@("`@(&UV=VEN<V-H
XM("AE;G1R>2T^9FEE;&0L(#`L(&5N=')Y+3YS8W)E96YC;VPK*RP@)RXG('P@
XM96YT<GDM/F9I96QD871T<BD["B`@("`@("`@("`@('T*("`@("`@("`@("`@
XM96QS90H@("`@("`@("`@("!["B`@("`@("`@("`@("`@(&UV=VEN<V-H("AE
XM;G1R>2T^9FEE;&0L(#`L(&5N=')Y+3YS8W)E96YC;VPK*RP@<&QA:6YC:&%R
XM('P@96YT<GDM/F9I96QD871T<BD["B`@("`@("`@("`@('T*("`@("`@("`@
XM("`@=VUO=F4@*&5N=')Y+3YF:65L9"P@,"P@96YT<GDM/G-C<F5E;F-O;"`I
XM.PH@("`@("`@("`@("!W<F5F<F5S:"`H96YT<GDM/F9I96QD*3L*("`@("`@
XM("`@?0H@("`@("`@("!E;'-E"B`@("`@("`@('L*("`@("`@("`@("`@+RH@
XM57!D871E('1H92!C:&%R86-T97(@<&]I;G1E<BX)"0D)*B\*("`@("`@("`@
XM("`@=&5M<`D)/2`H:6YT*7-T<FQE;B`H96YT<GDM/FEN9F\I.PH@("`@("`@
XM("`@("!E;G1R>2T^:6YF;UMT96UP+3%="3T@<&QA:6YC:&%R.PH@("`@("`@
XM("`@("!E;G1R>2T^:6YF;UMT96UP70D](&5N=')Y+3YF:6QL97(@)B!!7T-(
XM05)415A4.PH@("`@("`@("`@("!E;G1R>2T^:6YF;UMT96UP*S%="3T@)UPP
XM)SL*"B`@("`@("`@("`@("\J(%5P9&%T92!T:&4@<V-R965N"0D)"0DJ+PH@
XM("`@("`@("`@("!M=G=D96QC:"`H96YT<GDM/F9I96QD+"`P+"`P*3L*("`@
XM("`@("`@("`@:68@*`EE;G1R>2T^9&ES<'1Y<&4@/3T@=DA)3E0@?'P@96YT
XM<GDM/F1I<W!T>7!E(#T]('9(0TA!4B!\?"!<"@D)"65N=')Y+3YD:7-P='EP
XM92`]/2!V2$U)6$5$('Q\(&5N=')Y+3YD:7-P='EP92`]/2!V54A#2$%2('Q\
XM(%P*"0D)96YT<GDM/F1I<W!T>7!E(#T]('9,2$-(05(@?'P@96YT<GDM/F1I
XM<W!T>7!E(#T]('952$U)6$5$('Q\(%P*"0D)96YT<GDM/F1I<W!T>7!E(#T]
XM('9,2$U)6$5$("D*("`@("`@("`@("`@>PH@("`@("`@("`@("`@("!M=G=A
XM9&1C:"`H96YT<GDM/F9I96QD+"`P+"!E;G1R>2T^9FEE;&1W:61T:"TR+"`G
XM+B<@?"!E;G1R>2T^9FEE;&1A='1R*3L*("`@("`@("`@("`@?0H@("`@("`@
XM("`@("!E;'-E"B`@("`@("`@("`@('L*("`@("`@("`@("`@("`@;79W861D
XM8V@@*&5N=')Y+3YF:65L9"P@,"P@96YT<GDM/F9I96QD=VED=&@M,BP@<&QA
XM:6YC:&%R('P@96YT<GDM/F9I96QD871T<BD["B`@("`@("`@("`@('T*("`@
XM("`@("`@("`@;79W861D8V@@*&5N=')Y+3YF:65L9"P@,"P@96YT<GDM/F9I
XM96QD=VED=&@M,2P@96YT<GDM/F9I;&QE<BD["B`@("`@("`@("`@('=M;W9E
XM("AE;G1R>2T^9FEE;&0L(#`L(&5N=')Y+3YF:65L9'=I9'1H+3$I.PH@("`@
XM("`@("`@("!W<F5F<F5S:"`H96YT<GDM/F9I96QD*3L*("`@("`@("`@("`@
XM96YT<GDM/FQE9G1C:&%R*RL["B`@("`@("`@('T*("`@("`@?0H@("!]"GT*
XM"B\J"B`J(%1H:7,@97)A<V5S('1H92!I;F9O<FUA=&EO;B!I;B!T:&4@96YT
XM<GD@9FEE;&0*("H@86YD(')E9')A=W,@82!C;&5A;B!A;F0@96UP='D@96YT
XM<GD@9FEE;&0N"B`J+PIV;VED(&-L96%N0T1+16YT<GD@*$-$2T5.5%)9("IE
XM;G1R>2D*>PH@("`O*B!$96-L87)E(&QO8V%L('9A<FEA8FQE<RX)"0D)"0DJ
XM+PH@("!C:&%R('!L86EN8VAA<@D](&5N=')Y+3YF:6QL97(@)B!!7T-(05)4
XM15A4.PH@("!I;G0@=VED=&@@/2!E;G1R>2T^9FEE;&1W:61T:#L*("`@:6YT
XM('@["@H@("`O*B!%<F%S92!T:&4@:6YF;W)M871I;VX@:6X@=&AE(&-H87)A
XM8W1E<B!P;VEN=&5R+@D)"2HO"B`@(&-L96%N0VAA<B`H96YT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N97=686QU92P@8V]P>6-H87)S*3L*?0IT
X`
Xend
SHAR_EOF
  echo 'File cdk-4.6.0/entry.c is complete' &&
  echo 'uudecoding file cdk-4.6.0/entry.c' &&
  uudecode _sharuue.tmp < _sharuue.tmp && rm -f _sharuue.tmp &&
  $shar_touch -am 1229121095 'cdk-4.6.0/entry.c' &&
  chmod 0400 'cdk-4.6.0/entry.c' ||
  echo 'restore of cdk-4.6.0/entry.c failed'
  shar_count="`wc -c < 'cdk-4.6.0/entry.c'`"
  test 19691 -eq "$shar_count" ||
    echo "cdk-4.6.0/entry.c: original size 19691, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= cdk-4.6.0/graph.c ==============
if test -f 'cdk-4.6.0/graph.c' && test X"$1" != X"-c"; then
  echo 'x - skipping cdk-4.6.0/graph.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting cdk-4.6.0/graph.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'cdk-4.6.0/graph.c' &&
X#include "cdk.h"
X
X/*
X * $Author: glover $
X * $Date: 1995/12/15 23:49:30 $
X * $Revision: 1.23 $
X */
X
X/*
X * This creates a graph widget.
X */
XCDKGRAPH *newCDKGraph (CDKSCREEN *cdkscreen, int xplace, int yplace, int height, int width, char *title, char *xtitle, char *ytitle)
X{
X   /* Declare local variables.						*/
X   CDKGRAPH *graph	= (CDKGRAPH *)malloc (sizeof (CDKGRAPH));
X   int xpos		= xplace;
X   int ypos		= yplace;
X
X   /* Rejustify the x and y positions if we need to.			*/
X   alignxy (cdkscreen->window, &xpos, &ypos, width+3, height);
X
X   /* Create the graph pointer						*/
X   graph->parent	= cdkscreen->window;
X   graph->win		= newwin (height, width+3, ypos, xpos);
X   graph->boxHeight	= height;
X   graph->boxWidth	= width+3;
X   graph->box		= NOBOX;
X   graph->minx		= 0;
X   graph->maxx		= 0;
X   graph->xscale	= 0;
X   graph->yscale	= 0;
X   graph->displayType	= vLINE;
X
X   /* Is the graph pointer NULL???					*/
X   if (graph->win == (WINDOW *)NULL)
X   {
X      /* Clean up any memory used.					*/
X      free (graph);
X
X      /* Return a NULL pointer.						*/
X      return ( (CDKGRAPH *)NULL );
X   }
X
X   /* Translate the graph title char * to a chtype *			*/
X   if (title != (char *)NULL)
X   {
X      graph->title	= char2Chtype (title, &graph->titlelen, &graph->titlepos);
X      graph->titlepos	= justifyString (graph->boxWidth, graph->titlelen, graph->titlepos);
X   }
X   else
X   {
X      graph->title	= char2Chtype ("<C></5>Untitled", &graph->titlelen, &graph->titlepos);
X      graph->titlepos	= justifyString (graph->boxWidth, graph->titlelen, graph->titlepos);
X   }
X
X   /* Translate the X Axis title char * to a chtype *			*/
X   if (xtitle != (char *)NULL)
X   {
X      graph->xtitle	= char2Chtype (xtitle, &graph->xtitlelen, &graph->xtitlepos);
X      graph->xtitlepos	= justifyString (graph->boxHeight, graph->xtitlelen, graph->xtitlepos);
X   } 
X   else
X   {
X      graph->xtitle	= char2Chtype ("<C></5>X Axis", &graph->xtitlelen, &graph->xtitlepos);
X      graph->xtitlepos	= justifyString (graph->boxHeight, graph->xtitlelen, graph->xtitlepos);
X   }
X
X   /* Translate the Y Axis title char * to a chtype *			*/
X   if (ytitle != (char *)NULL)
X   {
X      graph->ytitle	= char2Chtype (ytitle, &graph->ytitlelen, &graph->ytitlepos);
X      graph->ytitlepos	= justifyString (graph->boxWidth, graph->ytitlelen, graph->ytitlepos);
X   } 
X   else
X   {
X      graph->ytitle	= char2Chtype ("<C></5>Y Axis", &graph->ytitlelen, &graph->ytitlepos);
X      graph->ytitlepos	= justifyString (graph->boxWidth, graph->ytitlelen, graph->ytitlepos);
X   }
X
X   /* Set some values of the graph structure.				*/
X   graph->graphchar	= (chtype *)NULL;
X
X   /* Register this baby.						*/
X   registerCDKObject (cdkscreen, vGRAPH, graph);
X
X   /* Return the graph pointer.						*/
X   return (graph);
X}
X
X/*
X * This sets the values of the graph.
X */
Xint setCDKGraph (CDKGRAPH *graph, int *values, int count, char *graphChars, boolean startAtZero, EGraphDisplayType displayType)
X{
X   /* Declare local variables.						*/
X   int min	= 99999999;
X   int max	= (min * -1);
X   int x	= 0;
X   int charCount, temp;
X
X   /* Keep the display type.						*/
X   graph->displayType	= displayType;
X
X   /* Remove the old graph char if it exists.				*/
X   freeChtype (graph->graphchar);
X   graph->graphchar = char2Chtype (graphChars, &charCount, &temp);
X
X   /* Check if the number of characters back is the same as the number	*/
X   /* of elements in the list.						*/
X   if (charCount < count)
X   {
X      /* Oops. Better let them know.					*/
X      freeChtype (graph->graphchar);
X      return (FALSE);
X   }
X
X   /* Copy the X values.						*/
X   for (x=0; x <count; x++)
X   {
X      /* Determine the min/max values of the graph.			*/
X      min		= MIN (values[x], min);
X      max		= MAX (values[x], max);
X
X      /* Copy the value.						*/
X      graph->values[x]	= values[x];
X   }
X   graph->count = count;
X   graph->minx = min;
X   graph->maxx = max;
X
X   /* Check the start at zero status.					*/
X   if (startAtZero)
X   {
X      graph->minx = 0;
X   }
X
X   /* Determine the scales.						*/
X   graph->xscale = ((graph->maxx - graph->minx) / (graph->boxHeight - 5));
X   graph->yscale = ((graph->boxWidth-4) / count);
X   return (TRUE);
X}
X
X/*
X * This function draws the graph widget.
X */
Xvoid drawCDKGraph (CDKGRAPH *graph, boolean Box)
X{
X   /* Declare local variables.						*/
X   int x		= 0;
X   int y		= 0;
X   int adj		= 0;
X   chtype attrib	= ' '|A_REVERSE;
X   char temp[100];
X
X   /* Keep the box information.						*/
X   graph->box		= Box;
X
X   /* Erase the old object...						*/
X   eraseCDKGraph (graph);
X
X   /* Draw in the vertical axis						*/
X   drawLine (graph->win, 2, 1, 2, graph->boxHeight-3, ACS_VLINE);
X
X   /* Draw in the horizontal axis					*/
X   drawLine (graph->win, 3, graph->boxHeight-3, graph->boxWidth, graph->boxHeight-3, ACS_HLINE);
X
X   /* Draw in the graph title.						*/
X   if (graph->title != (chtype *)NULL)
X   {
X      writeChtype (graph->win, graph->titlepos, 0, graph->title, HORIZONTAL, 0, graph->titlelen);
X   }
X   
X   /* Draw in the X axis title.						*/
X   if (graph->xtitle != (chtype *)NULL)
X   {
X      writeChtype (graph->win, 0, graph->xtitlepos, graph->xtitle, VERTICAL, 0, graph->xtitlelen);
X      attrib	= graph->xtitle[0] & A_ATTRIBUTES;
X   }
X   
X   /* Draw in the X axis high value.					*/
X   sprintf (temp, "%d", graph->maxx);
X   writeCharAttrib (graph->win, 1, 1, temp, attrib, VERTICAL, 0, strlen(temp));
X   
X   /* Draw in the X axis low value.					*/
X   sprintf (temp, "%d", graph->minx);
X   writeCharAttrib (graph->win, 1, graph->boxHeight-2-strlen(temp), temp, attrib, VERTICAL, 0, strlen(temp));
X   
X   /* Draw in the Y axis title.						*/
X   if (graph->ytitle != (chtype *)NULL)
X   {
X      writeChtype (graph->win, graph->ytitlepos, graph->boxHeight-1, graph->ytitle, HORIZONTAL, 0, graph->ytitlelen);
X      attrib	= graph->ytitle[0] & A_ATTRIBUTES;
X   }
X
X   /* Draw in the Y axis high value.					*/
X   sprintf (temp, "%d", graph->count);
X   writeCharAttrib (graph->win, graph->boxWidth-strlen(temp)-1, graph->boxHeight-2, temp, attrib, HORIZONTAL, 0, strlen(temp));
X   
X   /* Draw in the Y axis low value.					*/
X   sprintf (temp, "0");
X   writeCharAttrib (graph->win, 3, graph->boxHeight-2, temp, attrib, HORIZONTAL, 0, strlen(temp));
X   
X   /* Draw in the lines.						*/
X   adj	= 3;
X   for (y=0; y < graph->count; y++)
X   {
X       int colheight	= (graph->values[y] / graph->xscale) - 1;
X       mvwaddch (graph->win, graph->boxHeight-3, adj-1, ACS_TTEE);
X
X       /* If this is a plot graph, all we do is draw a dot.		*/
X       if (graph->displayType == vPLOT)
X       {
X          int temploc = graph->boxHeight-4-colheight;
X          mvwaddch (graph->win, temploc, adj, graph->graphchar[y]);
X          adj += 2;
X       } 
X       else
X       {
X          for (x=0; x <= graph->yscale; x++)
X          {
X             /* Draw a line.						*/
X             drawLine (graph->win, adj, graph->boxHeight-4-colheight, adj, graph->boxHeight-4, graph->graphchar[y]);
X             adj++;
X          }
X       }
X   }
X
X   /* Draw in the axis corners.						*/
X   mvwaddch (graph->win, 0, 2, ACS_URCORNER);
X   mvwaddch (graph->win, graph->boxHeight-3, 2, ACS_LLCORNER);
X   mvwaddch (graph->win, graph->boxHeight-3, graph->boxWidth, ACS_URCORNER);
X
X   /* Refresh and lets see 'er.						*/
X   wrefresh (graph->win);
X   wrefresh (graph->parent);
X}
X
X/*
X * This function destroys the graph widget.
X */
Xvoid destroyCDKGraph (CDKGRAPH *graph)
X{
X   /* Erase the object.							*/
X   eraseCDKGraph (graph);
X
X   /* Clear up the char pointers.					*/
X   freeChtype (graph->title);
X   freeChtype (graph->xtitle);
X   freeChtype (graph->ytitle);
X   freeChtype (graph->graphchar);
X      
X   /* Clean up the windows.						*/
X   delwin (graph->win);
X
X   /* Unregister this object.						*/
X   unregisterCDKObject (vGRAPH, graph);
X
X   /* Finish cleaning up.						*/
X   free (graph);
X}
X
X/*
X * This function erases the graph widget from the screen.
X */
Xvoid eraseCDKGraph (CDKGRAPH *graph)
X{
X   werase (graph->win);
X   wrefresh (graph->win);
X}
SHAR_EOF
  $shar_touch -am 1229121095 'cdk-4.6.0/graph.c' &&
  chmod 0400 'cdk-4.6.0/graph.c' ||
  echo 'restore of cdk-4.6.0/graph.c failed'
  shar_count="`wc -c < 'cdk-4.6.0/graph.c'`"
  test 7984 -eq "$shar_count" ||
    echo "cdk-4.6.0/graph.c: original size 7984, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= cdk-4.6.0/fselect.c ==============
if test -f 'cdk-4.6.0/fselect.c' && test X"$1" != X"-c"; then
  echo 'x - skipping cdk-4.6.0/fselect.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting cdk-4.6.0/fselect.c (binary)'
  sed 's/^X//' << 'SHAR_EOF' > _sharuue.tmp &&
Xbegin 600 cdk-4.6.0/fselect.c
XM(VEN8VQU9&4@(F-D:RYH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/5$@I("$](#`I("D*("`@("`@>PH@("`@("`@("`@;6]D92`]("<J)SL*
XM("`@("`@?0H*("`@("`@+RH@0W)E871E('1H92!F:6QE;F%M92X)"0D)"0DJ
XM+PH@("`@("!I9B`H(%-?25-,3DL@*&9I;&53=&%T+G-T7VUO9&4I("D*("`@
XM("`@>PH@("`@("`@("!S<')I;G1F("AT96UP+"`B)7-`(BP@9&ER3&ES=%MX
XM72D["B`@("`@("`@(&9S96QE8W0M/F1I<D-O;G1E;G1S6WA=(#T@8V]P>4-H
XM87(@*'1E;7`I.PH@("`@("!]"B`@("`@(&5L<V4@:68@*"!37TE34T]#2R`H
XM9FEL95-T870N<W1?;6]D92D@*0H@("`@("!["B`@("`@("`@('-P<FEN=&8@
XM*'1E;7`L("(E<R8B+"!D:7),:7-T6WA=*3L*("`@("`@("`@9G-E;&5C="T^
XM9&ER0V]N=&5N='-;>%T@/2!C;W!Y0VAA<B`H=&5M<"D["B`@("`@('T*("`@
XM("`@96QS92!I9B`H(%-?25-214<H9FEL95-T870N<W1?;6]D92D@*0H@("`@
XM("!["B`@("`@("`@('-P<FEN=&8@*'1E;7`L("(E<R5S)6,B+"!F<V5L96-T
XM+3YF:6QE071T<FEB=71E+"!D:7),:7-T6WA=+"!M;V1E*3L*("`@("`@("`@
XM9G-E;&5C="T^9&ER0V]N=&5N='-;>%T@/2!C;W!Y0VAA<B`H=&5M<"D["B`@
XM("`@('T*("`@("`@96QS92!I9B`H(%-?25-$25(H9FEL95-T870N<W1?;6]D
XM92D@*0H@("`@("!["B`@("`@("`@('-P<FEN=&8@*'1E;7`L("(E<R5S+R(L
XM(&9S96QE8W0M/F1I<D%T=')I8G5T92P@9&ER3&ES=%MX72D["B`@("`@("`@
XM(&9S96QE8W0M/F1I<D-O;G1E;G1S6WA=(#T@8V]P>4-H87(@*'1E;7`I.PH@
XM("`@("!]"B`@("`@(&5L<V4*("`@("`@>PH@("`@("`@("!S<')I;G1F("AT
XM96UP+"`B)7,E8R(L(&1I<D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@9FEL96YA;64@/2!C:'1Y<&4R0VAA<B`H9G-C<F]L;"T^:71E
XM;5MF<V-R;VQL+3YC=7)R96YT271E;5TI.PH@("`@("!F:6QE;F%M95MS=')L
XM96XH9FEL96YA;64I+3%=(#T@)UPP)SL*"B`@("`@("\J($1E=&5R;6EN92!T
XM:&4@9FEL92!T>7!E+@D)"0D)*B\*("`@("`@;'-T870@*&9I;&5N86UE+"`F
XM9FEL95-T870I.PH@("`@("!R96=U;&%R1FEL90D]("@@4U])4U)%1RAF:6QE
XM4W1A="YS=%]M;V1E*2`_(#$@.B`P*3L*("`@("`@:68@*')E9W5L87)&:6QE
XM*0H@("`@("!["B`@("`@("`@("\J($ET)W,@82!R96=U;&%R(&9I;&4L(&-R
XM96%T92!T:&4@9G5L;"!P871H+@D)"2HO"B`@("`@("`@('-P<FEN=&8@*'1E
XM;7`L("(E<R\E<R(L(&9S96QE8W0M/G!W9"P@9FEL96YA;64I.PH@("`@("`@
XM("!F<V5L96-T+3YP871H;F%M92`](&-O<'E#:&%R("AT96UP*3L*("`@("`@
XM"B`@("`@("`@("\J($-L96%N('5P('1H92!U<V5D(&UE;6]R>2X)"0D)"2HO
XM"B`@("`@("`@(&9R964@*&9I;&5N86UE*3L*"B`@("`@("`@("\J(%)E='5R
XM;B!T:&4@8V]M<&QE=&4@<&%T:&YA;64N"0D)"2HO"B`@("`@("`@(')E='5R
XM;B`H(&9S96QE8W0M/G!A=&AN86UE("D["B`@("`@('T*("`@("`@96QS90H@
XM("`@("!["B`@("`@("`@("\J($-R96%T92!T:&4@9&ER96-T;W)Y(&YA;64N
XM"0D)"0DJ+PH@("`@("`@("!S<')I;G1F("AT96UP+"`B)7,O)7,B+"!F<V5L
XM96-T+3YP=V0L(&9I;&5N86UE*3L*"B`@("`@("`@("\J($-L96%N('5P('1H
XM92!U<V5D(&UE;6]R>2X)"0D)"2HO"B`@("`@("`@(&9R964@*&9I;&5N86UE
XM*3L*"B`@("`@("`@("\J(%-E="!T:&4@9FEL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D)"0D)*B\*("`@("`@<F5T=7)N.PH@
XM("!]"@H@("`O*B!)9B!T:&4@:6YF;W)M871I;VX@8V]M:6YG(&EN(&ES('1H
XM92!S86UE(&%S('1H92!I;F9O<FUA=&EO;@DJ+PH@("`O*B!T:&%T(&ES(&%L
XM<F5A9'D@=&AE<F4L('1H97)E(&ES(&YO(&YE960@=&\@9&5S=')O>2!I="X)
XM"2HO"B`@(&EF("AF<V5L96-T+3YP=V0@(3T@9&ER96-T;W)Y*0H@("!["B`@
XM("`@("\J(%)E;6]V92!T:&4@;VQD('!O:6YT97()86YD('-E="!T:&4@;F5W
XM('9A;'5E+@D)"2HO"B`@("`@(&9R965#:&%R("AF<V5L96-T+3YP=V0I.PH@
XM("`@("!F<V5L96-T+3YP=V0@/2!G971C=V0@*$Y53$PL(#4Q,BD["B`@('T*
XM("`@:68@*&9S96QE8W0M/F9I;&5!='1R:6)U=&4@(3T@9FEL94%T=')I8G5T
XM92D*("`@>PH@("`@("`O*B!296UO=F4@=&AE(&]L9"!P;VEN=&5R"6%N9"!S
XM970@=&AE(&YE=R!V86QU92X)"0DJ+PH@("`@("!F<F5E0VAA<B`H9G-E;&5C
XM="T^9FEL94%T=')I8G5T92D["B`@("`@(&9S96QE8W0M/F9I;&5!='1R:6)U
XM=&4@/2!C;W!Y0VAA<B`H9FEL94%T=')I8G5T92D["B`@("`@(&9S96QE8W0M
XM/F9I;&5!='1R:6)U=&4@/2!C;W!Y0VAA<B`H9FEL94%T=')I8G5T92D["B`@
XM('T*("`@:68@*&9S96QE8W0M/F1I<D%T=')I8G5T92`A/2!D:7)!='1R:6)U
XM=&4I"B`@('L*("`@("`@+RH@4F5M;W9E('1H92!O;&0@<&]I;G1E<@EA;F0@
XM<V5T('1H92!N97<@=F%L=64N"0D)*B\*("`@("`@9G)E94-H87(@*&9S96QE
XM8W0M/F1I<D%T=')I8G5T92D["B`@("`@(&9S96QE8W0M/F1I<D%T=')I8G5T
XM92`](&-O<'E#:&%R("AD:7)!='1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971Y<&4["B`@(&-H87(@"0DJ;65S9ULQ,%T["B`@(&-H87()"0ET96UP
XM6S$P,%T["B`@(&EN=`D)"6QE;CL*"B`@("\J($=E="!T:&4@9FEL92!N86UE
XM+@D)"0D)"2HO"B`@(&9I;&5N86UE"3T@8VAT>7!E,D-H87(@*&9S8W)O;&PM
XM/FET96U;9G-C<F]L;"T^8W5R<F5N=$ET96U=*3L*("`@9FEL96YA;65;<W1R
XM;&5N*&9I;&5N86UE*2TQ72`]("=<,"<["@H@("`O*B!'970@<W!E8VEF:6,@
XM:6YF;W)M871I;VX@86)O=70@=&AE(&9I;&5S+@D)"0DJ+PH@("!L<W1A="`H
XM9FEL96YA;64L("9F:6QE4W1A="D["B`@(`H@("`O*B!$971E<FUI;F4@=&AE
XM(&9I;&4@='EP92X)"0D)"0DJ+PH@("!I9B`H(%-?25-,3DL@*&9I;&53=&%T
XM+G-T7VUO9&4I("D*("`@>PH@("`@("!F:6QE='EP92`]("),:6YK(CL*("`@
XM?0H@("!E;'-E(&EF("@@4U])4U-/0TL@*&9I;&53=&%T+G-T7VUO9&4I("D*
XM("`@>PH@("`@("!F:6QE='EP92`](")3;V-K970B.PH@("!]"B`@(&5L<V4@
XM:68@*"!37TE34D5'*&9I;&53=&%T+G-T7VUO9&4I("D*("`@>PH@("`@("!F
XM:6QE='EP92`](")296=U;&%R($9I;&4B.PH@("!]"B`@(&5L<V4@:68@*"!3
XM7TE31$E2*&9I;&53=&%T+G-T7VUO9&4I("D*("`@>PH@("`@("!F:6QE='EP
XM92`](")$:7)E8W1O<GDB.PH@("!]"B`@(&5L<V4@:68@*"!37TE30TA2*&9I
XM;&53=&%T+G-T7VUO9&4I("D*("`@>PH@("`@("!F:6QE='EP92`](")#:&%R
XM86-T97(@1&5V:6-E(CL*("`@?0H@("!E;'-E(&EF("@@4U])4T),2RAF:6QE
XM4W1A="YS=%]M;V1E*2`I"B`@('L*("`@("`@9FEL971Y<&4@/2`B0FQO8VL@
XM1&5V:6-E(CL*("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`B/$,^07)E('EO=2!S=7)E('EO=2!W86YT('1O
XM(&1E;&5T92!T:&4@9FEL93HB.PH@("!S<')I;G1F("AT96UP+"`B/$,^/"]5
XM/B5S/R(L(&9I;&5N86UE*3L@;65S9ULQ72`](&-O<'E#:&%R("AT96UP*3L*
XM"B`@("\J($-R96%T92!T:&4@9&EA;&]G(&)O>"X)"0D)"0DJ+PH@("!Q=65S
XM=&EO;B`](&YE=T-$2T1I86QO9R`H9G-E;&5C="T^<V-R965N+"!#14Y415(L
XM($-%3E1%4BP*"0D);65S9RP@,BP@8G5T=&]N<RP@,BP@05]2159%4E-%+`H)
XM"0E44E5%+"!44E5%+"!&04Q312D["@H@("`O*B!#;&5A;B!U<"!T:&ES('!O
XM:6YT97(N("AW92!M87D@;F5E9"!I="!A9V%I;B!R96%L('-O;VXN*0D)*B\*
XM("`@9G)E94-H87(@*&UE<V=;,5TI.PH*("`@+RH@268@=&AE('-A:60@>65S
XM('1H96X@=')Y('1O(&YU:V4@:70N"0D)"2HO"B`@(&EF("AA8W1I=F%T94-$
XM2T1I86QO9R`H<75E<W1I;VXI(#T](#$I"B`@('L*("`@("`@+RH@268@=V4@
XM=V5R92!S=6-C97-S9G5L+"!R96QO860@=&AE('-C<F]L;&EN9R!L:7-T+@D)
XM*B\*("`@("`@:68@*'5N;&EN:R`H9FEL96YA;64I(#T](#`I"B`@("`@('L*
XM("`@("`@("`@+RH@4V5T('1H92!F:6QE('-E;&5C=&]R(&EN9F]R;6%T:6]N
XM+@D)"0DJ+PH@("`@("`@("!S971#1$M&<V5L96-T("AF<V5L96-T+"!F<V5L
XM96-T+3YP=V0L"@D)9G-E;&5C="T^9FEE;&1!='1R:6)U=&4L(&9S96QE8W0M
XM/F9I;&QE<D-H87)A8W1E<BP@9G-E;&5C="T^:&EG:&QI9VAT+`H)"69S96QE
XM8W0M/F1I<D%T=')I8G5T92P@9G-E;&5C="T^9FEL94%T=')I8G5T92P@"@D)
XM9G-E;&5C="T^;&EN:T%T=')I8G5T92P@9G-E;&5C="T^<V]C:T%T=')I8G5T
XM92P@"@D)9G-E;&5C="T^8F]X*3L*("`@("`@?0H@("`@("!E;'-E"B`@("`@
XM('L*("`@("`@("`@+RH@4&]P('5P(&$@;65S<V%G92X)"0D)"0DJ+PH@("`@
XM("`@("!S<')I;G1F("AT96UP+"`B/$,^0V%N)W0@9&5L971E(&9I;&4Z(#PE
XM<SXB+"!S=')E<G)O<B`H97)R;F\I("D["B`@("`@("`@(&UE<V=;,%T@/2!C
XM;W!Y0VAA<B`H=&5M<"D["B`@("`@("`@(&UE<V=;,5T@/2`B("(["B`@("`@
XM("`@(&UE<V=;,ET@/2`B/$,^4')E<W,@86YY(&ME>2!T;R!C;VYT:6YU92XB
XM.PH@("`@("`@("!P;W!5<$UE<W-A9V4@*&9S96QE8W0M/G-C<F5E;BP@;65S
XM9RP@,RD["B`@("`@("`@(&9R965#:&%R("AM97-G6S!=*3L*("`@("`@?0H@
XM("!]"@H@("`O*B!#;&5A;B!U<"X)"0D)"0D)"2HO"B`@(&1E<W1R;WE#1$M$
XM:6%L;V<@*'%U97-T:6]N*3L*"B`@("\J(%)E9')A=R!T:&4@9FEL92!S96QE
XM8W1O<BX)"0D)"0DJ+PH@("!D<F%W0T1+1G-E;&5C="`H9G-E;&5C="P@9G-E
X.;&5C="T^8F]X*3L*?0H@
X`
Xend
SHAR_EOF
  echo 'uudecoding file cdk-4.6.0/fselect.c' &&
  uudecode _sharuue.tmp < _sharuue.tmp && rm -f _sharuue.tmp &&
  $shar_touch -am 1229121095 'cdk-4.6.0/fselect.c' &&
  chmod 0400 'cdk-4.6.0/fselect.c' ||
  echo 'restore of cdk-4.6.0/fselect.c failed'
  shar_count="`wc -c < 'cdk-4.6.0/fselect.c'`"
  test 18104 -eq "$shar_count" ||
    echo "cdk-4.6.0/fselect.c: original size 18104, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= cdk-4.6.0/histogram.c ==============
if test -f 'cdk-4.6.0/histogram.c' && test X"$1" != X"-c"; then
  echo 'x - skipping cdk-4.6.0/histogram.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting cdk-4.6.0/histogram.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'cdk-4.6.0/histogram.c' &&
X#include "cdk.h"
X
X/*
X * $Author: glover $
X * $Date: 1995/12/10 02:16:34 $
X * $Revision: 1.30 $
X */
X
X/*
X * This creates a histogram widget.
X */
XCDKHISTOGRAM *newCDKHistogram (CDKSCREEN *cdkscreen, int xplace, int yplace, int lplace, int height, int width, int orient, char *label, boolean box, boolean shadow)
X{
X   /* Declare local variables.						*/
X   CDKHISTOGRAM *histogram	= (CDKHISTOGRAM *)malloc (sizeof (CDKHISTOGRAM));
X   int boxwidth			= 0;
X   int boxheight		= height + 2;
X   int xpos			= xplace;
X   int ypos			= yplace;
X   int labelxoffset		= 0;
X   int labelyoffset		= 0;
X   int fieldxoffset		= 0;
X   int fieldyoffset		= 0;
X   int junk			= 0;
X   char *plainLabel;
X
X   /* Translate the char * to a chtype *				*/
X   histogram->label	= char2Chtype (label, &histogram->labellen, &junk);
X   plainLabel		= chtype2Char (histogram->label);
X   boxwidth		= width + histogram->labellen + 3;
X
X   /* Adjust the offset values given the location of the label.		*/
X   alignlabel (plainLabel, lplace, width, &boxwidth, &boxheight, &labelxoffset, &labelyoffset, &fieldxoffset, &fieldyoffset);
X   freeChar (plainLabel);
X
X   /* Rejustify the x and y positions if we need to.			*/
X   alignxy (cdkscreen->window, &xpos, &ypos, boxwidth, boxheight);
X
X   /* Create the histogram pointer.					*/
X   histogram->parent	= cdkscreen->window;
X   histogram->win	= newwin (boxheight, boxwidth, ypos, xpos);
X   histogram->shadowwin	= (WINDOW *)NULL;
X   histogram->labelwin	= subwin (cdkscreen->window, 1, histogram->labellen+2, ypos+labelyoffset, xpos+labelxoffset);
X   histogram->width	= width;
X   histogram->height	= height;
X   histogram->orient	= orient;
X   histogram->shadow	= shadow;
X
X   /* Is the window NULL.						*/
X   if (histogram->win == (WINDOW *)NULL)
X   {
X      /* Remove the labelwin if its not NULL.				*/
X      if ( histogram->labelwin != (WINDOW *)NULL)
X      {
X         delwin (histogram->labelwin);
X      }
X
X      /* Clean up any memory used.					*/
X      freeChtype (histogram->label);
X      free (histogram);
X
X      /* Return a NULL pointer.						*/
X      return ( (CDKHISTOGRAM *)NULL );
X   }
X
X   /* Set up some default values.					*/
X   histogram->filler	= '#' | A_REVERSE;
X   histogram->statsattr	= A_NORMAL;
X   histogram->statspos	= TOP;
X   histogram->viewtype	= vREAL;
X   histogram->high	= 0;
X   histogram->low	= 0;
X   histogram->value	= 0;
X   histogram->chars	= 0;
X   histogram->lowx	= 0;
X   histogram->lowy	= 0;
X   histogram->highx	= 0;
X   histogram->highy	= 0;
X   histogram->labelx	= 0;
X   histogram->labely	= 0;
X   histogram->statsx	= 0;
X   histogram->statsy	= 0;
X   histogram->histx	= 0;
X   histogram->histy	= 0;
X   histogram->lowchar	= (char *)NULL;
X   histogram->highchar	= (char *)NULL;
X   histogram->statschar	= (char *)NULL;
X   histogram->box	= box;
X
X   /* Do we want a shadow???						*/
X   if (shadow)
X   {
X      histogram->shadowwin	= subwin (cdkscreen->window, boxheight, boxwidth, ypos+1, xpos+1);
X   }
X
X   /* Register this baby.						*/
X   registerCDKObject (cdkscreen, vHISTOGRAM, histogram);
X
X   /* Return this thing.						*/
X   return (histogram);
X}
X
X/*
X * This sets the values for the histogram.
X */
Xvoid setCDKHistogram (CDKHISTOGRAM *histogram, EHistogramDisplayType viewtype, int statspos, chtype statsattr, int low, int high, int value, chtype filler, boolean box)
X{
X   /* Declare local variables.						*/
X   char		string[100];
X   int		adj;
X   float	temp;
X
X   /* Keep the box info.						*/
X   histogram->box	= box;
X
X   /* We should error check the information we have.			*/
X   histogram->low	= (low <= high ? low : 0);
X   histogram->high	= (low <= high ? high : 0);
X   histogram->value	= ( low <= value && value <= high ? value : 0);
X
X   /* Set some of the basic values.					*/
X   histogram->statspos	= statspos;
X   histogram->statsattr	= statsattr;
X   histogram->filler	= filler;
X   histogram->viewtype	= viewtype;
X   histogram->percent	= (histogram->high == 0 ? 0 : ( (float)histogram->value / (float)histogram->high ));
X   if (histogram->orient == VERTICAL)
X   {
X      temp		= histogram->percent * (float)histogram->height;
X   } 
X   else
X   {
X      temp		= histogram->percent * (float)histogram->width;
X   }
X   histogram->chars	= ( (float)abs(temp) == (float)temp ? (int)temp : (int)temp + 1);
X
X   /* We have a number of variables which determine the personality of	*/
X   /* the histogram. We have to go through each one methodically, and 	*/
X   /* set them correctly. This section does this.			*/
X   if (histogram->viewtype != vNONE)
X   {
X      if (histogram->orient == VERTICAL)
X      {
X         /* Set the vertical adjustment var				*/
X         adj = (histogram->label != (chtype *)NULL ? histogram->labellen + 1 : 0);
X
X         /* Make a vertical histogram the exception.			*/
X         if (histogram->statspos == LEFT || histogram->statspos == TOP)
X         {
X            /* Set the character strings correctly.			*/
X            freeChar (histogram->lowchar);
X            freeChar (histogram->highchar);
X            freeChar (histogram->statschar);
X
X            /* Set the low label attributes.				*/
X            sprintf (string, "%d", histogram->low);
X            histogram->lowchar		= copyChar (string);
X            histogram->lowx		= histogram->height - (int)strlen (string) + 2;
X            histogram->lowy		= adj;
X            
X            /* Set the high label attributes.				*/
X            sprintf (string, "%d", histogram->high);
X            histogram->highchar		= copyChar (string);
X            histogram->highx		= 0;
X            histogram->highy		= adj;
X   
X            /* Set the stats label attributes.				*/
X            if (histogram->viewtype == vPERCENT)
X            {
X               sprintf (string, "%3.1f%%", (float) (histogram->percent * 100));
X            }
X            else if (histogram->viewtype == vFRACTION)
X            {
X               sprintf (string, "%d/%d", histogram->value, histogram->high);
X            }
X            else
X            {
X               sprintf (string, "%d", histogram->value);
X            }
X            histogram->statschar	= copyChar (string);
X            histogram->statsx		= ((histogram->height - (int)strlen(string)) / 2) + 1;
X            histogram->statsy		= adj;
X         }
X         else if (histogram->statspos == RIGHT || histogram->statspos == BOTTOM)
X         {
X            /* Set the character strings correctly.			*/
X            freeChar (histogram->lowchar);
X            freeChar (histogram->highchar);
X            freeChar (histogram->statschar);
X   
X            /* Set the low label attributes.				*/
X            sprintf (string, "%d", histogram->low);
X            histogram->lowchar		= copyChar (string);
X            histogram->lowx		= histogram->height - (int)strlen (string) + 2;
X            histogram->lowy		= histogram->width + 1;
X            
X            /* Set the high label attributes.				*/
X            sprintf (string, "%d", histogram->high);
X            histogram->highchar		= copyChar (string);
X            histogram->highx		= 0;
X            histogram->highy		= histogram->width + 1;
X   
X            /* Set the stats label attributes.				*/
X            if (histogram->viewtype == vPERCENT)
X            {
X               sprintf (string, "%3.2f%%", (float) (histogram->percent * 100));
X            }
X            else if (histogram->viewtype == vFRACTION)
X            {
X               sprintf (string, "%d/%d", histogram->value, histogram->high);
X            }
X            else
X            {
X               sprintf (string, "%d", histogram->value);
X            }
X            histogram->statschar	= copyChar (string);
X            histogram->statsx		= ((histogram->height - (int)strlen(string)) / 2) + 1;
X            histogram->statsy		= histogram->width + 1;
X         }
X
X         /* Set the histogram positions attributes.			*/
X         histogram->histx		= histogram->height - histogram->chars + 1;
X         histogram->histy		= adj;
X      }
X      else
X      {
X         /* Set the vertical adjustment var				*/
X         adj = (histogram->label != (chtype *)NULL ? histogram->labellen + 1 : 0);
X
X         /* Make horizontal the default.				*/
X         if (histogram->statspos == TOP || histogram->statspos == LEFT)
X         {
X            /* Set the character strings correctly.			*/
X            freeChar (histogram->lowchar);
X            freeChar (histogram->highchar);
X            freeChar (histogram->statschar);
X
X            /* Set the low label attributes.    			*/
X            sprintf (string, "%d", histogram->low);
X            histogram->lowchar          = copyChar (string);
X            histogram->lowx             = 0;
X            histogram->lowy             = adj;
X            
X            /* Set the high label attributes.   			*/
X            sprintf (string, "%d", histogram->high);
X            histogram->highchar         = copyChar (string);
X            histogram->highx            = 0;
X            histogram->highy            = histogram->width - (int)strlen (string) + adj + 1;
X   
X            /* Set the stats label attributes.  			*/
X            if (histogram->viewtype == vPERCENT)
X            {
X               sprintf (string, "%3.1f%%", (float) (histogram->percent * 100));
X            }
X            else if (histogram->viewtype == vFRACTION)
X            {
X               sprintf (string, "%d/%d", histogram->value, histogram->high);
X            }
X            else
X            {
X               sprintf (string, "%d", histogram->value);
X            }
X            histogram->statschar        = copyChar (string);
X            histogram->statsx           = 0;
X            histogram->statsy           = ((histogram->width - (int)strlen(string)) / 2) + adj + 1;
X         }
X         else if (histogram->statspos == BOTTOM || histogram->statspos == RIGHT)
X         {
X            /* Set the character strings correctly.			*/
X            freeChar (histogram->lowchar);
X            freeChar (histogram->highchar);
X            freeChar (histogram->statschar);
X
X            /* Set the low label attributes.    			*/
X            sprintf (string, "%d", histogram->low);
X            histogram->lowchar          = copyChar (string);
X            histogram->lowx             = histogram->height + 1;
X            histogram->lowy             = adj;
X            
X            /* Set the high label attributes.   			*/
X            sprintf (string, "%d", histogram->high);
X            histogram->highchar         = copyChar (string);
X            histogram->highx            = histogram->height + 1;
X            histogram->highy            = histogram->width - (int)strlen (string) + adj + 1;
X   
X            /* Set the stats label attributes.  			*/
X            if (histogram->viewtype == vPERCENT)
X            {
X               sprintf (string, "%3.1f%%", (float) (histogram->percent * 100));
X            }
X            else if (histogram->viewtype == vFRACTION)
X            {
X               sprintf (string, "%d/%d", histogram->value, histogram->high);
X            }
X            else
X            {
X               sprintf (string, "%d", histogram->value);
X            }
X            histogram->statschar        = copyChar (string);
X            histogram->statsx           = histogram->height + 1;
X            histogram->statsy           = ((histogram->width - (int)strlen(string)) / 2) + adj + 1;
X         }
X         else if (histogram->statspos == CENTER)
X         {
X            /* Set the character strings correctly.			*/
X            freeChar (histogram->lowchar);
X            freeChar (histogram->highchar);
X            freeChar (histogram->statschar);
X
X            /* Set the low label attributes.    			*/
X            sprintf (string, "%d", histogram->low);
X            histogram->lowchar          = copyChar (string);
X            histogram->lowx             = (histogram->height == 1 ? 1 : (histogram->height / 2) );
X            histogram->lowy             = adj;
X            
X            /* Set the high label attributes.   			*/
X            sprintf (string, "%d", histogram->high);
X            histogram->highchar         = copyChar (string);
X            histogram->highx            = (histogram->height == 1 ? 1 : (histogram->height / 2) );
X            histogram->highy            = histogram->width - (int)strlen (string) + adj + 1;
X   
X            /* Set the stats label attributes.  			*/
X            if (histogram->viewtype == vPERCENT)
X            {
X               sprintf (string, "%3.1f%%", (float) (histogram->percent * 100));
X            }
X            else if (histogram->viewtype == vFRACTION)
X            {
X               sprintf (string, "%d/%d", histogram->value, histogram->high);
X            }
X            else
X            {
X               sprintf (string, "%d", histogram->value);
X            }
X            histogram->statschar        = copyChar (string);
X            histogram->statsx           = (histogram->height == 1 ? 1 : (histogram->height / 2) );
X            histogram->statsy           = ((histogram->width - (int)strlen(string)) / 2) + adj + 1;
X         }
X      }
X   }
X}
X
X/*
X * This function draws the histogram.
X */
Xvoid drawCDKHistogram (CDKHISTOGRAM *histogram, boolean Box)
X{
X   /* Declare the local variables.					*/
X   int x	= 0;
X   int y	= 0;
X
X   /* Erase the old object...						*/
X   eraseCDKHistogram (histogram);
X
X   /* Box the widget if asked.						*/
X   if (Box)
X   {
X      box (histogram->win, histogram->statsattr | ACS_VLINE, histogram->statsattr |ACS_HLINE);
X   }
X
X   /* Do we have a shadow to draw???					*/
X   if (histogram->shadow)
X   {
X      drawShadow (histogram->shadowwin);
X   }
X
X   /* Draw the histogram.						*/
X   if (histogram->orient == VERTICAL)
X   {
X       /* Declare the local vars.					*/
X       int temp	= (int)strlen (histogram->highchar);
X       chtype fattr, fchar, battr, bchar;
X
X       /* Draw in the high label					*/
X       for (x=0; x < temp; x++)
X       {
X          mvwaddch (histogram->win,	histogram->highx + x,
X					histogram->highy,
X					histogram->highchar[x] | histogram->statsattr);
X       }
X
X       /* Draw in the low label						*/
X       temp =(int)strlen (histogram->lowchar);
X       for (x=0; x < temp; x++)
X       {
X          mvwaddch (histogram->win,	histogram->lowx + x,
X					histogram->lowy,
X					histogram->lowchar[x] | histogram->statsattr);
X       }
X
X       /* Draw in the stats label					*/
X       temp =(int)strlen (histogram->statschar);
X       for (x=0; x < temp; x++)
X       {
X          mvwaddch (histogram->win,	histogram->statsx + x,
X					histogram->statsy,
X					histogram->statschar[x] | histogram->statsattr);
X       }
X
X       /* Draw in the histogram.					*/
X       temp	= histogram->labellen;
X       fattr	= histogram->filler & A_ATTRIBUTES;
X       fchar	= histogram->filler & A_CHARTEXT;
X
X       for (x=histogram->histx; x <= histogram->height; x++)
X       {
X          for (y=1; y <= histogram->width; y++)
X          {
X#ifdef WINCHBUG
X             battr	= ' ' | A_REVERSE;
X#else
X             battr	= mvwinch (histogram->win, x, y+temp );
X#endif
X             fchar	= battr & A_ATTRIBUTES;
X             bchar	= battr & A_CHARTEXT;
X             if (bchar == ' ')
X             {
X                mvwaddch (histogram->win, x, y+temp, histogram->filler);
X             }
X             else
X             {
X                mvwaddch (histogram->win, x, y+temp, battr | fattr);
X             }
X          }
X       }
X       wrefresh (histogram->win);
X
X       /* Draw in the label						*/
X       writeChtype (histogram->labelwin, 0, 0, histogram->label, HORIZONTAL, 0, histogram->labellen);
X       wrefresh (histogram->labelwin);
X   }
X   else
X   {
X       /* Declare the local vars.					*/
X       int temp	= (int)strlen (histogram->highchar);
X       chtype fattr, fchar, battr, bchar;
X       int x, y;
X
X       /* Draw in the high label					*/
X       for (x=0; x < temp; x++)
X       {
X          mvwaddch (histogram->win,	histogram->highx,
X					histogram->highy + x,
X					histogram->highchar[x] | histogram->statsattr);
X       }
X
X       /* Draw in the low label						*/
X       temp	= (int)strlen (histogram->lowchar);
X       for (x=0; x < temp; x++)
X       {
X          mvwaddch (histogram->win,	histogram->lowx,
X					histogram->lowy + x,
X					histogram->lowchar[x] | histogram->statsattr);
X       }
X
X       /* Draw in the stats label					*/
X       temp	= (int)strlen (histogram->statschar);
X       for (x=0; x < temp; x++)
X       {
X          mvwaddch (histogram->win,	histogram->statsx,
X					histogram->statsy + x,
X					histogram->statschar[x] | histogram->statsattr);
X       }
X
X       /* Set up some variables we need for the histogram.		*/
X       temp	= histogram->labellen;
X       fattr	= histogram->filler & A_ATTRIBUTES;
X       fchar	= histogram->filler & A_CHARTEXT;
X
X       /* Draw in the histogram.					*/
X       for (x=1; x <= histogram->height; x++)
X       {
X          for (y=0; y < histogram->chars; y++)
X          {
X             /* Get the character and split it into its elements	*/
X#ifdef WINCHBUG
X             battr	= ' ' | A_REVERSE;
X#else
X             battr	= mvwinch (histogram->win, x, y+temp );
X#endif
X             bchar	= battr & A_CHARTEXT;
X             fchar	= battr & A_ATTRIBUTES;
X
X             /* If there was nothing there, put the histogram		*/
X             /* down.							*/
X             if (bchar == ' ')
X             {
X                mvwaddch (histogram->win, x, y+temp, histogram->filler);
X             }
X             else
X             {
X                mvwaddch (histogram->win, x, y+temp, bchar | fattr);
X             }
X          }
X       }
X       wrefresh (histogram->win);
X
X       /* Draw in the label						*/
X       writeChtype (histogram->labelwin, 0, 0, histogram->label, HORIZONTAL, 0, histogram->labellen);
X       wrefresh (histogram->labelwin);
X   }
X}
X
X/*
X * This function destroys the histogram.
X */
Xvoid destroyCDKHistogram (CDKHISTOGRAM *histogram)
X{
X   /* Erase the object.							*/
X   eraseCDKHistogram (histogram);
X
X   /* Clean up the char pointers.					*/
X   freeChtype (histogram->label);
X   freeChar (histogram->lowchar);
X   freeChar (histogram->highchar);
X   freeChar (histogram->statschar);
X
X   /* Clean up the windows.						*/
X   delwin (histogram->win);
X   delwin (histogram->labelwin);
X   if (histogram->shadow)
X   {
X      delwin (histogram->shadowwin);
X   }
X
X   /* Unregister this object.						*/
X   unregisterCDKObject (vHISTOGRAM, histogram);
X
X   /* Finish cleaning up.						*/
X   free (histogram);
X}
X
X/*
X * This function erases the histogram from the screen.
X */
Xvoid eraseCDKHistogram (CDKHISTOGRAM *histogram)
X{
X   werase (histogram->win);
X   werase (histogram->labelwin);
X   wrefresh (histogram->win);
X   wrefresh (histogram->labelwin);
X
X   /* Do we need to erase the shadow...					*/
X   if (histogram->shadow)
X   {
X      werase (histogram->shadowwin);
X      wrefresh (histogram->shadowwin);
X   }
X}
SHAR_EOF
  $shar_touch -am 1229121095 'cdk-4.6.0/histogram.c' &&
  chmod 0400 'cdk-4.6.0/histogram.c' ||
  echo 'restore of cdk-4.6.0/histogram.c failed'
  shar_count="`wc -c < 'cdk-4.6.0/histogram.c'`"
  test 18650 -eq "$shar_count" ||
    echo "cdk-4.6.0/histogram.c: original size 18650, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= cdk-4.6.0/itemlist.c ==============
if test -f 'cdk-4.6.0/itemlist.c' && test X"$1" != X"-c"; then
  echo 'x - skipping cdk-4.6.0/itemlist.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting cdk-4.6.0/itemlist.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'cdk-4.6.0/itemlist.c' &&
X#include "cdk.h"
X
X/*
X * $Author: glover $
X * $Date: 1995/12/10 02:16:34 $
X * $Revision: 1.5 $
X */
X
X/*
X * This creates a pointer to an itemlist widget.
X */
XCDKITEMLIST *newCDKItemlist (CDKSCREEN *cdkscreen, int xplace, int yplace, int lplace, char *label, char **item, int count, int defaultItem, boolean box, boolean shadow)
X{
X   /* Set up some variables.						*/
X   CDKITEMLIST *itemlist = (CDKITEMLIST *)malloc (sizeof (CDKITEMLIST));
X   char *plainlabel	= (char *)NULL;
X   int boxwidth		= 0;
X   int boxheight	= 3;
X   int fieldWidth	= 0;
X   int xpos		= xplace;
X   int ypos		= yplace;
X   int labelxoffset	= 0;
X   int labelyoffset	= 0;
X   int fieldxoffset	= 0;
X   int fieldyoffset	= 0;
X   int temp		= 0;
X   int x;
X
X   /* Translate the label char *pointer to a chtype pointer.		*/
X   itemlist->label	= char2Chtype (label, &itemlist->labellen, &temp);
X   plainlabel		= chtype2Char (itemlist->label);
X
X   /* Go through the list and determine the widest item.		*/
X   for (x=0; x < count; x++)
X   {
X      /* Copy the item to the list.					*/
X      itemlist->item[x]	= char2Chtype (item[x], &itemlist->itemlen[x], &itemlist->itempos[x]);
X      fieldWidth = (fieldWidth < itemlist->itemlen[x] ? itemlist->itemlen[x] : fieldWidth);
X   }
X   fieldWidth += 2;
X
X   /* Now we need to justify the strings.				*/
X   for (x=0; x < count; x++)
X   {
X      itemlist->itempos[x] = justifyString (fieldWidth, itemlist->itemlen[x], itemlist->itempos[x]);
X   }
X
X   /* Adjust the offset values given the location of the label.		*/
X   alignlabel (plainlabel, lplace, fieldWidth, &boxwidth, &boxheight, &labelxoffset, &labelyoffset, &fieldxoffset, &fieldyoffset);
X   freeChar (plainlabel);
X   
X   /* Rejustify the x and y positions if we need to.			*/
X   alignxy (cdkscreen->window, &xpos, &ypos, boxwidth, boxheight);
X
X   /* Make the label window.						*/
X   itemlist->win = newwin (boxheight, boxwidth, ypos, xpos);
X
X   /* Is the window NULL ???						*/
X   if (itemlist->win == (WINDOW *)NULL)
X   {
X      /* Clean up the pointers.						*/
X      freeChtype (itemlist->label);
X      free (itemlist);
X      
X      /* Exit with NULL.						*/
X      return ( (CDKITEMLIST *)NULL );
X   }
X
X   /* Make the field window.						*/
X   itemlist->fieldwin	= subwin (cdkscreen->window, 1, fieldWidth, ypos+fieldyoffset, xpos+fieldxoffset);
X   itemlist->labelwin	= subwin (cdkscreen->window, 1, itemlist->labellen+1, ypos+labelyoffset, xpos+labelxoffset);
X   keypad (itemlist->fieldwin, TRUE);
X
X   /* Set up the rest of the structure.					*/
X   itemlist->parent		= cdkscreen->window;
X   itemlist->shadowwin		= (WINDOW *)NULL;
X   itemlist->fieldWidth		= fieldWidth;
X   itemlist->itemCount		= count-1;
X   itemlist->box		= box;
X   itemlist->shadow		= shadow;
X
X   /* Set then default item.						*/
X   if (defaultItem >= 0 && defaultItem <= itemlist->itemCount)
X   {
X      itemlist->currentItem	= defaultItem;
X      itemlist->defaultItem	= defaultItem;
X   }
X   else
X   {
X      itemlist->currentItem	= 0;
X      itemlist->defaultItem	= 0;
X   }
X
X   /* Do we want a shadow???						*/
X   if (shadow)
X   {
X      itemlist->shadowwin = newwin (boxheight, boxwidth, ypos+1, xpos+1);
X   }
X
X   /* Clean the key bindings.						*/
X   cleanCDKObjectBindings (vITEMLIST, itemlist);
X
X   /* Register this baby.               				*/
X   registerCDKObject (cdkscreen, vITEMLIST, itemlist);
X
X   /* Return the pointer to the structure				*/
X   return (itemlist);
X}
X
X/*
X * This allows the user to play with the widget.
X */
Xint activateCDKItemlist (CDKITEMLIST *itemlist)
X{
X   /* Declare some local variables.					*/
X   chtype input;
X
X   /* Draw the widget.							*/
X   drawCDKItemlist (itemlist, itemlist->box);
X
X   /* Let 'em play....							*/
X   for (;;)
X   {
X      /* Get the input from the user.					*/
X      input = wgetch (itemlist->fieldwin);
X
X      /* Check a predefined binding.					*/
X      if ( ! checkCDKObjectBind (vITEMLIST, itemlist, input) )
X      {
X         switch (input)
X         {
X            case KEY_UP : case KEY_RIGHT : case ' ' : case '+' : case 'n' :
X                 if (itemlist->currentItem < itemlist->itemCount )
X                 {
X                    itemlist->currentItem++;
X                 }
X                 else
X                 {
X                    itemlist->currentItem = 0;
X                 }
X                 break;
X
X            case KEY_DOWN : case KEY_LEFT : case '-' : case 'p' :
X                 if (itemlist->currentItem > 0 )
X                 {
X                    itemlist->currentItem--;
X                 }
X                 else
X                 {
X                    itemlist->currentItem = itemlist->itemCount;
X                 }
X                 break;
X
X            case 'd' : case 'D' :
X                 itemlist->currentItem = itemlist->defaultItem;
X                 break;
X
X            case '0' :
X                 itemlist->currentItem = 0;
X                 break;
X
X            case '$' :
X                 itemlist->currentItem = itemlist->itemCount;
X                 break;
X
X            case KEY_RETURN : case KEY_TAB : case CDK_NEXT :
X                 return ( itemlist->currentItem );
X                 break;
X
X            case CDK_REFRESH :
X                 refreshCDKScreen (itemlist->screen);
X                 break;
X
X            default :
X                 Beep();
X                 break;
X         }
X      }
X
X      /* Redraw the field.					*/
X      drawCDKItemlistField (itemlist);
X   }
X}
X
X/*
X * This draws the widget on the screen.
X */
Xvoid drawCDKItemlist (CDKITEMLIST *itemlist, int Box)
X{
X   /* Erase the widget from the screen.					*/
X   eraseCDKItemlist (itemlist);
X 
X   /* Did we ask for a shadow?						*/
X   if (itemlist->shadow)
X   {
X      drawShadow (itemlist->shadowwin);
X   }
X 
X   /* Box the widget if asked.						*/
X   if (Box)
X   {
X      box (itemlist->win, ACS_VLINE, ACS_HLINE);
X      wrefresh (itemlist->win);
X   }
X 
X   /* Draw in the label to the widget.                                  */
X   writeChtype (itemlist->labelwin, 0, 0, itemlist->label, HORIZONTAL, 0, itemlist->labellen);
X   wrefresh (itemlist->labelwin);
X
X   /* Draw in the field.						*/
X   drawCDKItemlistField (itemlist);
X}
X
X/*
X * This function draws the contents of the field.
X */
Xvoid drawCDKItemlistField (CDKITEMLIST *itemlist)
X{
X   /* Declare local vars.						*/
X   int currentItem = itemlist->currentItem;
X   int x;
X
X   /* Draw in the current item in the field.				*/
X   werase (itemlist->fieldwin);
X   for (x=0; x < itemlist->itemlen[currentItem]; x++)
X   {
X      mvwaddch (itemlist->fieldwin, 0, x+itemlist->itempos[currentItem], itemlist->item[currentItem][x]);
X   }
X   wrefresh (itemlist->fieldwin);
X}
X
X/*
X * This function removes the widget from the screen.
X */
Xvoid eraseCDKItemlist (CDKITEMLIST *itemlist)
X{
X   werase (itemlist->fieldwin);
X   werase (itemlist->labelwin);
X   werase (itemlist->win);
X   wrefresh (itemlist->win);
X
X   /* Do we want to erase the shadow.				*/
X   if (itemlist->shadow)
X   {
X      werase (itemlist->shadowwin);
X      wrefresh (itemlist->shadowwin);
X   }
X}
X
X/*
X * This function destroys the widget and all the memory it used.
X */
Xvoid destroyCDKItemlist (CDKITEMLIST *itemlist)
X{
X   /* Declare local variables.					*/
X   int x;
X
X   /* Erase the object.						*/
X   eraseCDKItemlist (itemlist);
X
X   /* Clear out the character pointers.				*/
X   freeChtype (itemlist->label);
X   for (x=0; x <= itemlist->itemCount; x++)
X   {
X      freeChtype (itemlist->item[x]);
X   }
X
X   /* Delete the windows.					*/
X   delwin (itemlist->fieldwin);
X   delwin (itemlist->labelwin);
X   delwin (itemlist->win);
X   if (itemlist->shadow)
X   {
X      delwin (itemlist->shadowwin);
X   }
X
X   /* Unregister this object.					*/
X   unregisterCDKObject (vITEMLIST, itemlist);
X
X   /* Finish cleaning up.					*/
X   free (itemlist);
X}
X
X/*
X * This function sets the contents of the list.
X */
Xvoid setCDKItemlist (CDKITEMLIST *itemlist, char **item, int count, int defaultItem, boolean box)
X{
X   /* Declare local variables.					*/
X   int x;
X
X   /* Free up the old memory.					*/
X   for (x=0; x <= itemlist->itemCount; x++)
X   {
X      freeChtype (itemlist->item[x]);
X   }
X
X   /* Copy in the new information.				*/
X   itemlist->itemCount = count-1;
X   for (x=0; x <= itemlist->itemCount; x++)
X   {
X      /* Copy the new stuff in.					*/
X      itemlist->item[x]	= char2Chtype (item[x], &itemlist->itemlen[x], &itemlist->itempos[x]);
X      itemlist->itempos[x] = justifyString (itemlist->fieldWidth, itemlist->itemlen[x], itemlist->itempos[x]);
X   }
X
X   /* Set the box flag.						*/
X   itemlist->box = box;
X
X   /* Set the default item.					*/
X   if (defaultItem >= 0 && defaultItem <= itemlist->itemCount)
X   {
X      itemlist->currentItem = defaultItem;
X      itemlist->defaultItem = defaultItem;
X   }
X
X   /* Draw the field.						*/
X   drawCDKItemlistField (itemlist);
X}
SHAR_EOF
  $shar_touch -am 1229121095 'cdk-4.6.0/itemlist.c' &&
  chmod 0400 'cdk-4.6.0/itemlist.c' ||
  echo 'restore of cdk-4.6.0/itemlist.c failed'
  shar_count="`wc -c < 'cdk-4.6.0/itemlist.c'`"
  test 8749 -eq "$shar_count" ||
    echo "cdk-4.6.0/itemlist.c: original size 8749, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= cdk-4.6.0/label.c ==============
if test -f 'cdk-4.6.0/label.c' && test X"$1" != X"-c"; then
  echo 'x - skipping cdk-4.6.0/label.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting cdk-4.6.0/label.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'cdk-4.6.0/label.c' &&
X#include "cdk.h"
X
X/*
X * $Author: glover $
X * $Date: 1995/12/10 02:16:34 $
X * $Revision: 1.28 $
X */
X
X/*
X * This creates a label widget.
X */
XCDKLABEL *newCDKLabel(CDKSCREEN *cdkscreen, int xplace, int yplace, char **mesg, int rows, boolean box, boolean shadow)
X{
X   /* Maintain the label information					*/
X   CDKLABEL *label	= (CDKLABEL *)malloc (sizeof (CDKLABEL));
X   int boxWidth		= 0;
X   int boxHeight	= rows + 2;
X   int xpos		= xplace;
X   int ypos		= yplace;
X   int x		= 0;
X
X   /* Determine the box width.						*/
X   for (x=0; x < rows; x++)
X   {
X      /* Translate the char * to a chtype.				*/
X      label->info[x]	= char2Chtype (mesg[x], &label->infolen[x], &label->infopos[x]);
X      boxWidth		= MAX(boxWidth, label->infolen[x]);
X   }
X   boxWidth += 2;
X
X   /* Create the string alignments.					*/
X   for (x=0; x < rows; x++)
X   {
X      label->infopos[x]	= justifyString (boxWidth, label->infolen[x], label->infopos[x]);
X   }
X
X   /* Rejustify the x and y positions if we need to.			*/
X   alignxy (cdkscreen->window, &xpos, &ypos, boxWidth, boxHeight);
X
X   /* Create the label							*/
X   label->parent	= cdkscreen->window;
X   label->win		= newwin (boxHeight, boxWidth, ypos, xpos);
X   label->shadowwin	= (WINDOW *)NULL;
X   label->xpos		= xpos;
X   label->ypos		= ypos;
X   label->rows		= rows;
X   label->width		= boxWidth;
X   label->box		= box;
X   label->shadow	= shadow;
X
X   /* Is the window NULL???						*/
X   if (label->win == (WINDOW *)NULL) 
X   {
X      /* Free up any memory used.					*/
X      for (x=0; x < rows; x++)
X      {
X         freeChtype (label->info[x]);
X      }
X      free(label);
X
X      /* Return a NULL pointer.						*/
X      return ( (CDKLABEL *)NULL );
X   }
X
X   /* If a shadow was requested, then create the shadow window.		*/
X   if (shadow)
X   {
X      label->shadowwin	= newwin (boxHeight, boxWidth, ypos+1, xpos+1);
X   }
X
X   /* Register this baby.						*/
X   registerCDKObject (cdkscreen, vLABEL, label);
X
X   /* Return the label pointer.						*/
X   return (label);
X}
X
X/*
X * This draws the label widget.
X */
Xvoid drawCDKLabel (CDKLABEL *label, boolean Box)
X{
X   /* Declare local variables.						*/
X   int x	= 0;
X   
X   /* Keep the box information.						*/
X   label->box	= Box;
X
X   /* Erase the label widget from the screen.				*/
X   eraseCDKLabel (label);
X
X   /* Box the widget if asked.						*/
X   if (label->box)
X   {
X      box (label->win, ACS_VLINE, ACS_HLINE);
X   }
X
X   /* Is there a shadow???						*/
X   if (label->shadow)
X   {
X      drawShadow (label->shadowwin);
X   }
X
X   /* Draw in the message.						*/
X   for (x=0; x < label->rows; x++)
X   {
X     writeChtype (label->win, label->infopos[x], x+1, label->info[x], HORIZONTAL, 0, label->infolen[x]);
X   }
X   wrefresh (label->win);
X}
X
X/*
X * This erases the label widget.
X */
Xvoid eraseCDKLabel (CDKLABEL *label)
X{
X   werase (label->win);
X   wrefresh (label->win);
X
X   /* Do we need to erase the shadow win.				*/
X   if (label->shadow)
X   {
X      werase (label->shadowwin);
X      wrefresh (label->shadowwin);
X   }
X}
X
X/*
X * This destroys the label object pointer.
X */
Xvoid destroyCDKLabel (CDKLABEL *label)
X{
X   /* Declare local variables.						*/
X   int x		= 0;
X
X   /* Erase the old label.						*/
X   eraseCDKLabel (label);
X
X   /* Free up the character pointers.					*/
X   for (x=0; x < label->rows ; x++)
X   {
X      freeChtype (label->info[x]);
X   }
X
X   /* Free up the window pointers.					*/
X   delwin (label->win);
X
X   /* Is there a shadow with this widget???				*/
X   if (label->shadow)
X   {
X      delwin (label->shadowwin);
X   }
X 
X   /* Unregister the object.						*/
X   unregisterCDKObject (vLABEL, label);
X
X   /* Free the object pointer.						*/
X   free (label);
X}
X
X/*
X * This pauses until a user hits a key...
X */
Xchar waitCDKLabel (CDKLABEL *label, char key)
X{
X   /* If the key is null, we'll accept anything.			*/
X   if ( key == (char)NULL )
X   {
X      return (wgetch (label->win));
X   }
X   else
X   {
X      /* Only exit when a specific key is hit.				*/
X      char newkey;
X      for (;;)
X      {
X         newkey = wgetch(label->win);
X         if (newkey == key)
X         {
X            return ( newkey );
X         }
X      }
X   }
X}
SHAR_EOF
  $shar_touch -am 1229121095 'cdk-4.6.0/label.c' &&
  chmod 0400 'cdk-4.6.0/label.c' ||
  echo 'restore of cdk-4.6.0/label.c failed'
  shar_count="`wc -c < 'cdk-4.6.0/label.c'`"
  test 4121 -eq "$shar_count" ||
    echo "cdk-4.6.0/label.c: original size 4121, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= cdk-4.6.0/marquee.c ==============
if test -f 'cdk-4.6.0/marquee.c' && test X"$1" != X"-c"; then
  echo 'x - skipping cdk-4.6.0/marquee.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting cdk-4.6.0/marquee.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'cdk-4.6.0/marquee.c' &&
X#include "cdk.h"
X
X/*
X * $Author: glover $
X * $Date: 1995/12/10 02:16:34 $
X * $Revision: 1.24 $
X */
X
X/*
X * This creates a marquee widget.
X */
XCDKMARQUEE *newCDKMarquee (CDKSCREEN *cdkscreen, int xplace, int yplace, int width, boolean shadow)
X{
X   CDKMARQUEE *marquee	= (CDKMARQUEE *)malloc (sizeof (CDKMARQUEE));
X   int xpos		= xplace;
X   int ypos		= yplace;
X   int boxheight	= 3;
X   int boxwidth		= width + 2;
X
X   /* Rejustify the x and y positions if we need to.			*/
X   alignxy (cdkscreen->window, &xpos, &ypos, boxwidth, boxheight);
X
X   /* Create the marquee pointer.					*/
X   marquee->parent	= cdkscreen->window;
X   marquee->win		= newwin (boxheight, boxwidth, ypos, xpos);
X   marquee->shadowwin	= (WINDOW *)NULL;
X   marquee->active	= TRUE;
X   marquee->width	= width;
X   marquee->box		= NOBOX;
X   marquee->shadow	= shadow;
X
X   /* Is the window NULL???						*/
X   if (marquee->win == (WINDOW *)NULL)
X   {
X      /* Clean up any memory.						*/
X      free (marquee);
X
X      /* Return a NULL pointer.						*/
X      return ( (CDKMARQUEE *)NULL );
X   }
X
X   /* Register this baby.						*/
X   registerCDKObject (cdkscreen, vMARQUEE, marquee);
X
X   /* Return the marquee pointer.					*/
X   return(marquee);
X}
X
X/* 
X * This activates the marquee.
X */
Xint activateCDKMarquee (CDKMARQUEE *marquee, char *mesg, int delay, int repeat, boolean box)
X{
X   /* Declear local variables.						*/
X   chtype *message;
X   int mesglength 	= 0;
X   int startpos		= 0;
X   int firstchar	= 0;
X   int lastchar		= 1;
X   int repeatCount	= 0;
X   int viewsize		= 0;
X#ifdef NOUSLEEP
X   int sleeper		= 0;
X#endif
X   int x, y, junk;
X
X   /* Keep the box info.						*/
X   marquee->box = box;
X
X   /* Make sure the message has some content.				*/
X   if (mesg == (char *)NULL)
X   {
X      return (-1);
X   }
X   
X   /* Translate the char * to a chtype *				*/
X   message	= char2Chtype (mesg, &mesglength, &junk);
X
X   /* Draw in the marquee.						*/
X   drawCDKMarquee (marquee, box);
X
X   /* Set up the variables.						*/
X   viewsize = lastchar - firstchar;
X   startpos = marquee->width - viewsize + 1;
X
X   /* Start doing the marquee thing...					*/
X   for (;;)
X   {
X      if (marquee->active)
X      {
X         /* Draw in the characters.					*/
X         y = firstchar;
X         for (x=startpos ; x < (startpos+viewsize) ; x++)
X         {
X            mvwaddch (marquee->win, 1, x, message[y]);
X            y++;
X         }
X         wrefresh (marquee->win);
X   
X         /* Set my variables.						*/
X         if (mesglength < marquee->width-2)
X         {
X            if (lastchar < mesglength)
X            {
X               lastchar ++;
X               viewsize ++;
X               startpos = marquee->width - viewsize + 1;
X            }
X            else if (lastchar == mesglength)
X            {
X               if (startpos > 1)
X               {
X                  /* This means the whole string is visible.		*/
X                  startpos --;
X                  viewsize = mesglength;
X               }
X               else
X               {
X                 /* We have to start chopping the viewsize		*/
X                 startpos = 1;
X                 firstchar ++;
X                 viewsize --;
X               }
X            }
X         }
X         else
X         {
X            if (startpos > 1)
X            {
X               lastchar ++;
X               viewsize ++;
X               startpos --;
X            }
X            else
X            {
X               if (lastchar < mesglength)
X               {
X                  firstchar ++;
X                  lastchar  ++;
X                  viewsize = marquee->width;
X                  startpos = 1;
X               }
X               else
X               {
X                  firstchar ++;
X                  viewsize --;
X                  startpos = 1;
X               }
X            }
X         }
X
X         /* OK, lets check if we have to start over.			*/
X         if ( viewsize == 0 && firstchar == mesglength)
X         {
X            /* Check if we need to repeat or not.			*/
X            repeatCount ++;
X            if (repeat > 0 && repeatCount == repeat)
X            {
X               freeChtype (message);
X               return (0);
X            }
X
X            /* Time to start over. 					*/
X            mvwaddch (marquee->win, 1, 1, ' '|A_NORMAL);
X            wrefresh (marquee->win);
X#ifndef NOUSLEEP
X            curs_set(0);
X#endif
X            firstchar = 0;
X            lastchar = 1;
X            viewsize = lastchar - firstchar;
X            startpos = marquee->width - viewsize + 1;
X         }
X   
X         /* Now sleep							*/
X#ifdef NOUSLEEP
X         for (sleeper = 0; sleeper <= (delay * 250) ; sleeper++) {}
X#else
X         usleep ( (delay * 10000) );
X#endif
X      }
X      else
X      {
X         printf ("\r\n\r\n\r\n\r\nMarquee turned off\r\n");
X         }
X   }
X}
X
X/*
X * This draws the marquee widget on the screen.
X */
Xvoid drawCDKMarquee (CDKMARQUEE *marquee, boolean Box)
X{
X   /* Keep the box information.						*/
X   marquee->box	= Box;
X
X   /* Erase the old object...						*/
X   eraseCDKMarquee (marquee);
X
X   /* Do we need to draw a shadow???					*/
X   if (marquee->shadow)
X   {
X      drawShadow (marquee->shadowwin);
X   }
X
X   /* Box it if needed.							*/
X   if (Box)
X   {
X      box (marquee->win, ACS_VLINE, ACS_HLINE);
X      wrefresh (marquee->win);
X   }
X}
X
X/*
X * This destroys the marquee.
X */
Xvoid destroyCDKMarquee (CDKMARQUEE *marquee)
X{
X   /* Erase the object.							*/
X   eraseCDKMarquee (marquee);
X
X   /* Clean up the windows.						*/
X   delwin (marquee->win);
X   if (marquee->shadow)
X   {
X      delwin (marquee->shadowwin);
X   }
X
X   /* Unregister this object.						*/
X   unregisterCDKObject (vMARQUEE, marquee);
X   
X   /* Finish cleaning up.						*/
X   free (marquee);
X}
X
X/*
X * This erases the marquee.
X */
Xvoid eraseCDKMarquee (CDKMARQUEE *marquee)
X{
X   werase (marquee->win);
X   wrefresh (marquee->win);
X   if (marquee->shadow)
X   {
X      werase (marquee->shadowwin);
X      wrefresh (marquee->shadowwin);
X   }
X}
SHAR_EOF
  $shar_touch -am 1229121095 'cdk-4.6.0/marquee.c' &&
  chmod 0400 'cdk-4.6.0/marquee.c' ||
  echo 'restore of cdk-4.6.0/marquee.c failed'
  shar_count="`wc -c < 'cdk-4.6.0/marquee.c'`"
  test 5915 -eq "$shar_count" ||
    echo "cdk-4.6.0/marquee.c: original size 5915, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= cdk-4.6.0/matrix.c ==============
if test -f 'cdk-4.6.0/matrix.c' && test X"$1" != X"-c"; then
  echo 'x - skipping cdk-4.6.0/matrix.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting cdk-4.6.0/matrix.c (binary)'
  sed 's/^X//' << 'SHAR_EOF' > _sharuue.tmp &&
Xbegin 600 cdk-4.6.0/matrix.c
XM(VEN8VQU9&4@(F-D:RYH(@H*+RH*("H@)$%U=&AO<CH@9VQO=F5R("0*("H@
XM)$1A=&4Z(#$Y.34O,3(O,C,@,C(Z,C@Z-38@)`H@*B`D4F5V:7-I;VXZ(#$N
XM-S,@)`H@*B\*"B\J($1E8V%L<F4@9VQO8F%L('9A<G,N"0D)"0D)"2HO"G-T
XM871I8R!C:&%R("I087-T94)U9F9E<@D]("AC:&%R("HI3E5,3#L*=F]I9"!R
XM961R87=4:71L97,@*$-$2TU!5%))6"`J;6%T<FEX+"!I;G0@<F]W+"!I;G0@
XM8V]L*3L*"B\J"B`J(%1H:7,@9G5N8W1I;VX@8W)E871E<R!T:&4@;6%T<FEX
XM('=I9&=E="X*("HO"D-$2TU!5%))6"`J;F5W0T1+36%T<FEX("A#1$M30U)%
XM14X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T^<F]W=&ET;&5;
XM>ETI.PH@("`@("!]"B`@("`@(&9R964@*&UA=')I>"D["@H@("`@("`O*B!2
XM971U<FX@82!.54Q,('!O:6YT97(N"0D)"0D)*B\*("`@("`@<F5T=7)N("@@
XM*$-$2TU!5%))6"`J*4Y53$P@*3L*("`@?0H*("`@+RH@36%K92!T:&4@<W5B
XM=VEN9&]W<R!I;B!T:&4@<&]P+75P+@D)"0DJ+PH@("!B96=X(#T@>'!O<SL*
XM("`@8F5G>2`]('EP;W,@*R`Q.PH*("`@+RH@36%K92!T:&4@)V5M<'1Y)R`P
XM>#`@8V5L;"X)"0D)"2HO"B`@(&UA=')I>"T^8V5L;%LP75LP72`]('-U8G=I
SHAR_EOF
  : || echo 'restore of cdk-4.6.0/matrix.c failed'
fi
echo 'End of archive part 5'
echo 'File cdk-4.6.0/matrix.c is continued in part 6'
echo 6 > _sharseq.tmp
exit 0


