cdk-perl-20150928/0000755000175100001440000000000012602361704012207 5ustar tomuserscdk-perl-20150928/VERSION0000644000175100001440000000002312602361553013254 0ustar tomusers0:0:0 5.0 20150928 cdk-perl-20150928/examples/0000755000175100001440000000000012170626214014025 5ustar tomuserscdk-perl-20150928/examples/mentry0000755000175100001440000000121312170625264015272 0ustar tomusers#!/usr/bin/perl -w # $Id: mentry,v 1.3 2013/07/14 22:48:20 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Mentry Widget use strict; # # Load in the Cdk Extension. # use Cdk; # # Initialize Cdk. # Cdk::init(); # Create the multi-line entry object. my $mentry = new Cdk::Mentry( 'Label' => "Filename: ", 'Width' => 20, 'Prows' => 5, 'Lrows' => 10 ); # Activate the object. my $filename = $mentry->activate(); # Check the results. if ( !defined $filename ) { popupLabel( ["Escape hit. No information returned."] ); } else { popupLabel( [ "You typed in", "$filename" ] ); } # Shut down Cdk. Cdk::end(); cdk-perl-20150928/examples/bind0000755000175100001440000000302012170622743014665 0ustar tomusers#!/usr/bin/perl -w # $Id: bind,v 1.4 2013/07/14 22:27:47 tom Exp $ # # Purpose: # To demonstrate the character binding features of the # Perl5/Cdk extension. # use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # This callback fills the entry field with a filename. sub callback { my $entryObj = shift @_; # Generate a list of files in the current directory. my @files = <*>; my $filelist = new Cdk::Scroll( 'Title' => "Pick A File", 'Height' => 10, 'Width' => 20, 'List' => \@files ); # Activate the scrolling list. my $itemPicked = $filelist->activate(); undef $filelist; # Set the filename. $entryObj->set( 'Min' => 0, 'Max' => 255, 'Value' => $files[$itemPicked] ); # Redraw the entry field. $entryObj->draw(); return 1; } # Create a new entry object. my $title = [ "", "Type in a filename or", "Press tab to get a list.", "" ]; my $filename = new Cdk::Entry( 'Label' => "Filename: ", 'Title' => $title, 'Width' => 20, 'Min' => 0, 'Max' => 256 ); # Create a key binding. my @mesg = ( "Hi Mike", "How Are You?" ); $filename->bind( 'Key' => "KEY_TAB", 'Function' => sub { main::callback($filename); } ); # Activate the object. my $file = $filename->activate(); # Check the results. if ( !defined $file ) { popupLabel( ["Escape hit, no filename entered."] ); } else { popupLabel( ["You typed in the filename ($file)"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/fselect0000755000175100001440000000126212170625464015407 0ustar tomusers#!/usr/bin/perl -w # $Id: fselect,v 1.3 2013/07/14 22:50:28 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk file selector widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create the file selector. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Filler' => "_", 'Height' => 0, 'Width' => 0 ); # Activate the object. $fselect->set( 'ULChar' => "#" ); my $filename = $fselect->activate(); # Check the results. if ( !defined $filename ) { popupLabel( ["You hit escape. No file selected."] ); } else { popupLabel( [ "You selected the following file", "($filename)" ] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/swindow0000755000175100001440000000114112170623474015447 0ustar tomusers#!/usr/bin/perl -w # $Id: swindow,v 1.4 2013/07/14 22:33:32 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Scrolling Window Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the scrolling window. my $swindow = new Cdk::Swindow( 'Title' => "Scrolling Window", 'Lines' => 200, 'Height' => 20, 'Width' => -4 ); # Open this file and read myself in. my @info = qx (cat $0); chomp @info; my $line; $swindow->draw(); # Line by line, add the info. foreach $line (@info) { $swindow->addline( 'Info' => $line ); sleep 1; } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/scroll0000755000175100001440000000170412170624770015260 0ustar tomusers#!/usr/bin/perl -w # $Id: scroll,v 1.3 2013/07/14 22:45:12 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Scroll Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the scrolling list. my @listItems = ( "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9" ); # Create the scrolling list object. my $scroll = new Cdk::Scroll( 'Title' => "Scroll Title", 'Height' => -10, 'Width' => -10, 'Numbers' => "TRUE", 'Spos' => "RIGHT", 'List' => \@listItems ); $scroll->add( 'Item' => "HELLO" ); # Activate the scrolling list. my $itemPicked = $scroll->activate(); # Check the results. if ( !defined $itemPicked ) { popupLabel( ["Escape hit. No menu item selected."] ); } elsif ( $itemPicked > $#listItems ) { popupLabel( ["Hello there!"] ); } else { popupLabel( ["You selected $listItems[$itemPicked]"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/graph0000755000175100001440000000134012170626141015051 0ustar tomusers#!/usr/bin/perl -w # $Id: graph,v 1.3 2013/07/14 22:55:29 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Graph Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create the graph values. my @values = qw (50 0 25 66 41 42 30 49 27); my $chars = "123456789"; # Create the graph object. my $graph = new Cdk::Graph( 'Title' => "Total Breakins", 'Xtitle' => "Count", 'Ytitle' => 'Time Period', 'Height' => -4, 'Width' => -4 ); # Load the object up. $graph->set( 'Values' => \@values, 'GraphChars' => $chars, 'Box' => "FALSE" ); # Draw the graph. $graph->draw(); # Wait until the user hits a key. getc(STDIN); # End Cdk. Cdk::end(); cdk-perl-20150928/examples/matrix0000755000175100001440000000344712170625347015275 0ustar tomusers#!/usr/bin/perl -w # $Id: matrix,v 1.3 2013/07/14 22:49:11 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Matrix Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the matrix field attibutes. my @rowtitles = ( "Course 1", "Course 2", "Course 3", "Course 4", "Course 5" ); my @coltitles = ( "Course", "Lec 1", "Lec 2", "Lec 3", "Flag" ); my @colwidths = ( 7, 5, 5, 5, 1 ); my @coltypes = ( "UMIXED", "UMIXED", "UMIXED", "UMIXED", "UMIXED" ); my $title = [ "Course Selection Matrix", "", "<#HL(30)>" ]; my $x; # Create the matrix object. my $matrix = new Cdk::Matrix( 'Title' => $title, 'RowTitles' => \@rowtitles, 'ColTitles' => \@coltitles, 'ColWidths' => \@colwidths, 'ColTypes' => \@coltypes, 'Vrows' => 3, 'Vcols' => $#coltitles + 1, 'BoxCell' => "TRUE", 'BoxMatrix' => "TRUE" ); # Using this array, we will load up the matrix. my @matrixValues = ( [ "PSY340Y", "L0101", "L0201", "", "" ], [ "PSY340H", "L0101", "L0201", "", "" ], [ "PSY440Y", "L0101", "L0201", "", "" ], [ "PSY201Y", "L0101", "L0201", "", "" ] ); # Load up the matrix. $matrix->set( 'Values' => \@matrixValues ); # Draw the matrix. $matrix->draw(); # Activate the matrix. my ( $rows, $cols, $info ) = $matrix->activate(); # Check the results. if ( !defined $rows ) { popupLabel( ["Escape hit. No information in the matrix."] ); } else { my @info = ("Rows: $rows Cols: $cols"); for ( $x = 0 ; $x < $rows ; $x++ ) { my $row = ""; for ( my $y = 0 ; $y < $cols ; $y++ ) { $row .= "($x,$y) = $info->[$x][$y], "; } chomp $row; chomp $row; push( @info, $row ); } popupLabel( \@info ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/menu0000755000175100001440000000156012170625207014722 0ustar tomusers#!/usr/bin/perl -w # $Id: menu,v 1.3 2013/07/14 22:47:35 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Menu Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the menu list items. my @fMenu = ( "File", "Save", "Open", "Delete", "Exit" ); my @eMenu = ( "Edit", "Cut", "Copy", "Delete", "Paste" ); my @hMenu = ( "Help", "Help", "About..." ); my @menulist = ( \@fMenu, \@eMenu, \@hMenu ); my @menuloc = ( "LEFT", "LEFT", "RIGHT" ); # Create the menu object. my $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc ); # Activate the object. my ( $menuItem, $submenuItem ) = $menu->activate(); # Check the results. if ( !defined $menuItem ) { popupLabel( ["Escape hit. No menu item selected."] ); } else { popupLabel( ["Item Selected $menulist[$menuItem]->[$submenuItem]"] ); } # End Cdk. Cdk::end(); cdk-perl-20150928/examples/viewer0000755000175100001440000000231112170624103015244 0ustar tomusers#!/usr/bin/perl -w # $Id: viewer,v 1.3 2013/07/14 22:37:55 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Viewer Widget. use strict; # # Initialize Cdk. # use Cdk; use Getopt::Long; Cdk::init(); our ( $opt_f, $opt_h, $opt_w ); # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Parse the command line options. my $ret = GetOptions( 'f|file:s', 'h|height:i', 'w|width:i' ); my $height = $opt_h || $rows - 2; my $width = $opt_w || $cols; my $filename = $opt_f; # Activate the object. if ( !defined $filename ) { # Create a file selector widget to get the filename. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Height' => $height, 'Width' => $width ); # Get the filename. $filename = $fselect->activate(); } # Open the file and load it up. my @info = qx (cat $filename); chomp @info; # Create the viewer object. my $viewer = new Cdk::Viewer( 'Buttons' => ["<>"], 'Height' => $height, 'Width' => $width ); # Set the contents of the viewer. $viewer->set( 'Title' => "File: $filename", 'Info' => \@info ); # Activate the viewer. my $selection = $viewer->activate(); # End Cdk. Cdk::end(); cdk-perl-20150928/examples/preProcess0000755000175100001440000000217112170625141016077 0ustar tomusers#!/usr/bin/perl -w # $Id: preProcess,v 1.3 2013/07/14 22:46:57 tom Exp $ # # Purpose: # To demonstrate the preProcess method. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a new entry object. my $title = [ "", "Type in anything but the dreaded letter 'G'!", "" ]; my $entry = new Cdk::Entry( 'Label' => "Type Anything: ", 'Title' => $title, 'Width' => 20, 'Min' => 0, 'Max' => 256 ); # Set up the pre and post processing. $entry->preProcess( 'Function' => sub { preProcessCB( @_, $entry ); } ); # Activate the object. my $info = $entry->activate(); # Check the results. if ( !defined $info ) { popupLabel( ["You hit escape, nothing returned."] ); } else { popupLabel( ["You typed in ($info)"] ); } # Exit Cdk. Cdk::end(); # # This example will set the pre process function so it # will not accept the letter g. # sub preProcessCB { my ( $input, $entry ) = @_; # Check the letter. if ( uc $input eq "G" ) { Cdk::Beep(); popupLabel( ["I Told You NOT To Do That"] ); $entry->draw(); return 0; } return 1; } cdk-perl-20150928/examples/entry0000755000175100001440000000111712170625753015123 0ustar tomusers#!/usr/bin/perl -w # $Id: entry,v 1.3 2013/07/14 22:53:31 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Entry Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a new entry object. my $entry = new Cdk::Entry( 'Label' => "Type Anything: ", 'Width' => 20, 'Min' => 0, 'Max' => 256 ); # Activate the object. my $info = $entry->activate(); # Check the results. if ( !defined $info ) { popupLabel( ["You hit escape, nothing returned."] ); } else { popupLabel( ["You typed in ($info)"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/postProcess0000755000175100001440000000413112170626214016276 0ustar tomusers#!/usr/bin/perl -w # $Id: postProcess,v 1.4 2013/07/14 22:56:12 tom Exp $ # # Purpose: # To demonstrate the postProcess method. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the scrolling list. my @commandItems = ( "Add Account ", "Delete Account ", "Account Information ", "Change Account Password ", "Change Account Shell ", "Change Account Directory", "Quit " ); my @commandInfo = ( "Adds a new account to the system.", "Deletes an exiting account from the system.", "Provides information about a given account.", "Changes a given account's current password.", "Changes a given account's login shell.", "Changes a given account's login directory.", "Exits this interface." ); my @initMessage = ("******************************************************"); # Create the title. my $title = new Cdk::Label( 'Message' => ["Unix System Admin Interface."], 'Ypos' => "TOP", 'Xpos' => "LEFT" ); # Create the scrolling list object. my $scroll = new Cdk::Scroll( 'Title' => "Pick An Option", 'Highlight' => "", 'Height' => 10, 'Width' => 35, 'Numbers' => "TRUE", 'List' => \@commandItems ); # Set the post-process for the scrolling list. $scroll->postProcess( 'Function' => sub { setInfoLabelCB(); } ); # Create the scrolling list item label. my $infoLabel = new Cdk::Label( 'Message' => \@initMessage, 'Xpos' => 1, 'Ypos' => 3 ); # Set the contents of the info label. $infoLabel->set( 'Message' => ["$commandInfo[0]"] ); $infoLabel->draw(); # Draw the screen. $title->draw(); $infoLabel->draw(); # Do this forever. for ( ; ; ) { # Activate the scrolling list. my $item = $scroll->activate(); } # Exit Cdk. Cdk::end(); # # # sub setInfoLabelCB { # Get the current itrm from the scrolling list. my ( $size, $currentItem ) = $scroll->info(); # Set the info in the label. $infoLabel->set( 'Message' => ["$commandInfo[$currentItem]"] ); $infoLabel->draw(); return 1; } cdk-perl-20150928/examples/calendar0000755000175100001440000000052312170626014015522 0ustar tomusers#!/usr/bin/perl -w # $Id: calendar,v 1.3 2013/07/14 22:54:04 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Calendar Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the celendar object. my $calendar = new Cdk::Calendar(); # Activate the object. my $ret = $calendar->activate(); # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/label0000755000175100001440000000103712170625422015033 0ustar tomusers#!/usr/bin/perl -w # $Id: label,v 1.3 2013/07/14 22:49:54 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Label Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the label rows. my @mesg = ( "This is a test of the Perl Cdk extension.", "", "", "Written by...", "Mike Glover" ); # Create the label object. my $title = new Cdk::Label( 'Message' => \@mesg ); # Draw the label. $title->set( 'BoxAttribute' => "" ); $title->draw(); $title->wait(); # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/radio0000755000175100001440000000152012170623535015052 0ustar tomusers#!/usr/bin/perl -w # $Id: radio,v 1.4 2013/07/14 22:34:05 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Radio Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the radio list. my @radioList = ( "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9", "Item 10", "Item 11", "Item 12" ); # Create the radio list object. my $radioWidget = new Cdk::Radio( 'Title' => ["Radio List"], 'List' => \@radioList, 'Height' => 10, 'Width' => 20 ); # Activate the radio object. $radioWidget->set( 'Choice' => "#" ); my $choice = $radioWidget->activate(); # Check the results. if ( !defined $choice ) { popupLabel( ["Escape hit. No item selected."] ); } else { popupLabel( ["You selected $radioList[$choice]."] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/slider0000755000175100001440000000115112170622401015225 0ustar tomusers#!/usr/bin/perl -w # $Id: slider,v 1.4 2013/07/14 22:24:01 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Slider Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the slider object. my $slider = new Cdk::Slider( 'Label' => "Pick A Number: ", 'Filler' => "*", 'Low' => 1, 'High' => 10, 'Width' => 50 ); # Activate the object. my $number = $slider->activate(); # Check the results. if ( !defined $number ) { popupLabel( ["Escape hit. No menu item selected."] ); } else { popupLabel( ["You chose $number"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/histogram0000755000175100001440000000145412170622647015762 0ustar tomusers#!/usr/bin/perl -w # $Id: histogram,v 1.4 2013/07/14 22:26:47 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Histogram Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); my $x; # # Create the histogram. # my $histogram = new Cdk::Histogram( 'Title' => "Dum De Dummmm", 'Height' => 3, 'Width' => 0, 'Orient' => "HORIZONTAL" ); # # Set some properties of the histogram. # $histogram->set( 'StatsType' => "PERCENT", 'StatsPos' => "CENTER", 'FillerChar' => "." ); # Set the values. for ( $x = 1 ; $x <= 100 ; $x += 2 ) { # Set the values of the histogram. $histogram->set( 'Value' => $x, 'Low' => 1, 'High' => 100 ); # Draw the histogram. $histogram->draw(); sleep(1); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/itemlist0000755000175100001440000000163212170623701015605 0ustar tomusers#!/usr/bin/perl -w # $Id: itemlist,v 1.4 2013/07/14 22:35:45 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Itemlist Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a list of the months of the year. my @months = ( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ); # Create an itemlist widget. my $itemlist = new Cdk::Itemlist( 'List' => \@months, 'Label' => "Month >>", 'Title' => ["Pick A Month"] ); # Activate the object. my $choice = $itemlist->activate(); # Check the results if ( !defined $choice ) { popupLabel( ["Escape hit. No item selected."] ); } else { popupLabel( ["You selected ($months[$choice])"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/alphalist0000755000175100001440000000141212170626107015733 0ustar tomusers#!/usr/bin/perl -w # $Id: alphalist,v 1.3 2013/07/14 22:55:03 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Alphalist Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Get the contents of the current directory. my @info = qx (ls); chomp @info; # Create a new alphalist object. my $alphalist = new Cdk::Alphalist( 'Label' => "Type Anything:", 'Filler' => "_", 'Height' => 20, 'Width' => 60, 'List' => \@info ); $alphalist->set( 'BoxAttribute' => "" ); # Activate the object. my $info = $alphalist->activate(); # Check the results... if ( !defined $info ) { popupLabel( ["You hit escape to exit the widget."] ); } else { popupLabel( ["You selected ($info)"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/selection0000755000175100001440000000172312170624455015750 0ustar tomusers#!/usr/bin/perl -w # $Id: selection,v 1.3 2013/07/14 22:41:49 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Selection Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the selection list. my @listItems = ( "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9" ); my @choices = ( "Yes", "No", "Maybe" ); # Create the selection list object. my $selection = new Cdk::Selection( 'Title' => "Selection List", 'List' => \@listItems, 'Choices' => \@choices, 'Height' => 10, 'Width' => 20 ); # Activate the object. my @info = $selection->activate(); # Check the results. if ( !defined @info ) { popupLabel( ["Escape hit. No menu item selected."] ); } else { my @list = ("Items Selected"); for ( my $x = 0 ; $x < $#info ; $x++ ) { push( @list, "$listItems[$x]" ) if $info[$x] == 0; } popupLabel( \@list ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/scale0000755000175100001440000000117412170625073015047 0ustar tomusers#!/usr/bin/perl -w # $Id: scale,v 1.3 2013/07/14 22:46:19 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Scale Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the scale object. my $scale = new Cdk::Scale( 'Label' => "Pick A Number: ", 'Low' => 1, 'High' => 10 ); # Activate the object. my $number = $scale->activate(); # Check the results. if ( !defined $number ) { popupLabel( ["Escape hit. No number selected."] ); } else { popupLabel( ["You selected $number"] ); } # Exit Cdk. Cdk::end(); # Print out the info. print "\n\n\n"; print "Number Chosen: $number\n"; cdk-perl-20150928/examples/dialog0000755000175100001440000000246012170623773015223 0ustar tomusers#!/usr/bin/perl -w # $Id: dialog,v 1.4 2013/07/14 22:36:43 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Dialog Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the dialog buttons. my @buttons = ( "Button 0", "Button 1", "Button 2", "Button 3" ); # Create the dialog message. my @mesg = ( "This should be centered", "This should be on the left.", "This should be on the right." ); # Create the dialog object. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons, 'Xpos' => "CENTER", 'Ypos' => "CENTER", 'Highlight' => "A_REVERSE" ); # Create a key binding. $dialog->bind( 'Key' => '?', 'Function' => sub { main::callback(); } ); # Activate the object. my $button = $dialog->activate(); # Check the results. if ( !defined $button ) { popupLabel( ["Escape hit. No button selected."] ); } else { popupLabel( ["You selected button $button"] ); } # Exit Cdk. Cdk::end(); # # This is the callback function to the dialog widget. # sub callback { my $label = new Cdk::Label( 'Message' => [ "This is the", "callback to the", "dialog widget." ] ); $label->draw(); $label->wait(); return 1; } cdk-perl-20150928/examples/template0000755000175100001440000000137512170624170015573 0ustar tomusers#!/usr/bin/perl -w # $Id: template,v 1.3 2013/07/14 22:38:48 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Template Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the template object. my $template = new Cdk::Template( 'Label' => 'Type in a date:', 'Plate' => '## ## ####', 'Overlay' => 'DD-MM-YYYY' ); # Activate the widget. my $date = $template->activate(); # Get the mixed date back. my $mixedDate = $template->mix(); # Check the results. if ( !defined $date ) { popupLabel( ["Escape hit. No information to return."] ); } else { popupLabel( [ "With Overlay Mixing : $mixedDate", "Without Overlay Mixing: $date" ] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/buttonbox0000755000175100001440000000141012170626050015771 0ustar tomusers#!/usr/bin/perl -w # $Id: buttonbox,v 1.3 2013/07/14 22:54:32 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Buttonbox Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the buttonbox buttons. my @buttons = ( "Button 0", "Button 1", "Button 2", "Button 3" ); # Create the buttonbox object. my $buttonbox = new Cdk::Buttonbox( 'Buttons' => \@buttons, 'Height' => 1, 'Width' => 50, 'Cols' => 4, 'Rows' => 1 ); # Activate the object. my $button = $buttonbox->activate(); # Check the results. if ( !defined $button ) { popupLabel( ["Escape hit. No button selected."] ); } else { popupLabel( ["You selected button $button"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20150928/examples/marquee0000755000175100001440000000100312170613763015411 0ustar tomusers#!/usr/bin/perl -w # $Id: marquee,v 1.3 2013/07/14 21:28:19 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Marquee Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the message to scroll. my $message = "Hello there!!! How are you today? "; # Create the marquee object. my $marquee = new Cdk::Marquee( 'Width' => 20 ); # Activate the marquee object. $marquee->activate( 'Message' => $message, 'Delay' => 3, 'Repeat' => 3 ); # Exit Cdk. Cdk::end(); cdk-perl-20150928/package/0000755000175100001440000000000012602361651013603 5ustar tomuserscdk-perl-20150928/package/cdk-perl.spec0000644000175100001440000000401412602361651016157 0ustar tomusers# $Revision: 1.19 $, $Date: 2015/09/29 01:04:41 $ # # Conditional build: # _without_tests - do not perform "make test" # %include %{_rpmconfigdir}/macros.perl Summary: Perl extensions for CDK Summary(pl): Rozszerzenie Perla dla CDK Name: cdk-perl Version: 5.0 Release: 20150928 License: distributable Group: Development/Languages/Perl Source0: ftp://invisible-island.net/cdk/cdk-perl-%{release}.tgz #BuildRequires: cdk-devel #BuildRequires: perl >= 5.005_03-10 #BuildRequires: rpm-perlprov #BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description This is the Perl5 extension to the Cdk library written by Mike Glover. All the copyright notices from the Cdk C distribution also apply to the extension. %description -l pl To jest rozszerzenie Perla do biblioteki Cdk. Wszystkie copyrighty z dystrybucji Cdk dotyczą także tego rozszerzenia. %prep %define debug_package %{nil} %define doc_dir %{_defaultdocdir}/%{name}-%{version} %define demos_dir %{doc_dir}/demos %define examples_dir %{doc_dir}/examples %setup -q -n cdk-perl-%{release} %build # echo "perl_sitelib %{perl_sitelib}" # echo "perl_sitearch %{perl_sitearch}" # echo "perl_archlib %{perl_archlib}" # echo "perl_privlib %{perl_privlib}" ./configure %{__make} %{!?_without_tests:%{__make} test} %install rm -rf %{buildroot} install -d %{buildroot}%{perl_archlib} %{__make} install \ BUILDDIR=%{buildroot} \ DESTDIR=%{buildroot} chmod -R u+w %{buildroot} install -d %{buildroot}%{doc_dir} install CHANGES %{buildroot}%{doc_dir} install COPYING %{buildroot}%{doc_dir} install README %{buildroot}%{doc_dir} install -d %{buildroot}%{demos_dir} install demos/* %{buildroot}%{demos_dir} install -d %{buildroot}%{examples_dir} install examples/* %{buildroot}%{examples_dir} %clean rm -rf %{buildroot} %files %{perl_archlib}/auto/Cdk %{perl_archlib}/perllocal.pod %{perl_archlib}/Cdk.pm %{perl_archlib}/Cdk %{doc_dir} %changelog * Sun Jul 14 2013 Thomas Dickey - adapted from spec-file from pld.org dated 2002/09/28 cdk-perl-20150928/package/freebsd/0000755000175100001440000000000012602361651015215 5ustar tomuserscdk-perl-20150928/package/freebsd/pkg-descr0000644000175100001440000000005212000275050017001 0ustar tomusersPerl interface to Curses Development Kit. cdk-perl-20150928/package/freebsd/Makefile0000644000175100001440000000122512602361651016655 0ustar tomusers# Created by: Chia-liang Kao # $FreeBSD: devel/p5-Cdk/Makefile 315974 2013-04-17 15:33:37Z miwi $ PORTNAME= Cdk PORTVERSION= 5.0.20150928 PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= ftp://invisible-island.net/cdk/ PKGNAMEPREFIX= p5- DISTNAME= cdk-perl-20130816 EXTRACT_SUFX= .tgz MAINTAINER= ports@FreeBSD.org COMMENT= Perl5 module for Curses Development Kit LIB_DEPENDS= cdk.5:${PORTSDIR}/devel/cdk GNU_CONFIGURE= yes CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" LIBS="-L${LOCALBASE}/lib" #PERL_CONFIGURE= no # #post-patch: # ${REINPLACE_CMD} 's,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/Makefile.PL .include cdk-perl-20150928/package/freebsd/pkg-plist0000644000175100001440000000245212000275050017042 0ustar tomusers%%SITE_PERL%%/%%PERL_ARCH%%/Cdk.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Alphalist.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Buttonbox.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Calendar.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Debug.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Diag.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Dialog.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Entry.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Fselect.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Graph.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Histogram.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Itemlist.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Marquee.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Matrix.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Menu.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Mentry.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Label.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Radio.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Scale.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Scroll.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Selection.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Slider.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Swindow.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Template.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Viewer.pm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/.packlist %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/Cdk.so %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/Cdk.bs %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/autosplit.ix @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk cdk-perl-20150928/package/freebsd/distinfo0000644000175100001440000000021012171600261016742 0ustar tomusersSHA256 (cdk-perl-20130717.tgz) = 889cc9df343afccaab8cc246c757d43d16bf05edb54954e8aa7d00b27143d928 SIZE (cdk-perl-20130717.tgz) = 159587 cdk-perl-20150928/package/debian/0000755000175100001440000000000012602361651015025 5ustar tomuserscdk-perl-20150928/package/debian/rules0000755000175100001440000000034712427024441016107 0ustar tomusers#!/usr/bin/make -f override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info %: dh $@ # This does not work with Debian 5.0 (use "compress" file instead): #override_dh_compress: # dh_compress -Xexamples cdk-perl-20150928/package/debian/control0000644000175100001440000000231511731454114016430 0ustar tomusersSource: libcdk-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: Jeremiah Foster , Damyan Ivanov , gregor herrmann , Dominic Hargreaves Standards-Version: 3.9.2 Homepage: http://invisible-island.net/cdk/ Vcs-Git: git://git.debian.org/pkg-perl/packages/libcdk-perl.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libcdk-perl.git Build-Depends: debhelper (>= 7.0.50), libcdk5, libcdk5-dev, libncurses5-dev (>= 5.3), perl (>= 5.8) Package: libcdk-perl Architecture: any Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}, libperl4-corelibs-perl | perl (<< 5.12.3-7), libcdk5, libncurses5 (>= 5.3) Description: Perl interface for a curses widget library CDK stands for "Curses Development Kit". CDK sits on top of the curses library and provides 22 ready to use widgets for rapid application development of text-based interfaces. CDK delivers many of the common widget types required for a robust interface. Widgets can be combined to create complex widgets if needed. . This package provides a Perl interface for the CDK library. cdk-perl-20150928/package/debian/watch0000644000175100001440000000015711657507064016072 0ustar tomusersversion=3 opts=uversionmangle=s/20031210/4.9.10/ \ ftp://invisible-island.net/cdk/ cdk-perl-(.*)\.tgz debian cdk-perl-20150928/package/debian/libcdk-perl.examples0000644000175100001440000000003011733447020020745 0ustar tomusersdemos examples fulldemo cdk-perl-20150928/package/debian/compress0000755000175100001440000000011011733353442016601 0ustar tomusers#!/bin/sh find . -type f |fgrep /usr/share | fgrep -v /examples/ exit 0 cdk-perl-20150928/package/debian/README.source0000644000175100001440000000036311657507064017217 0ustar tomusersThis package uses quilt to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. See /usr/share/doc/quilt/README.source for a detailed explanation. cdk-perl-20150928/package/debian/source/0000755000175100001440000000000012170233133016316 5ustar tomuserscdk-perl-20150928/package/debian/source/format0000644000175100001440000000001512170233133017525 0ustar tomusers3.0 (native) cdk-perl-20150928/package/debian/changelog0000644000175100001440000001276312602361651016710 0ustar tomuserslibcdk-perl (5.0.20150928) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Mon, 28 Sep 2015 21:04:25 -0400 libcdk-perl (5.0.20141106) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Thu, 06 Nov 2014 20:18:56 -0500 libcdk-perl (20130816) unstable; urgency=low * build-fix for perl 5.18 (patch by Nico Tyni, Debian #719578) -- Thomas E. Dickey Fri, 16 Aug 2013 18:20:08 -0400 libcdk-perl (20130717) unstable; urgency=low * fix for calendar functions -- Thomas E. Dickey Mon, 15 Jul 2013 21:06:53 -0400 libcdk-perl (20130714) unstable; urgency=low * improvements for packaging -- Thomas E. Dickey Sat, 13 Jul 2013 07:12:32 -0400 libcdk-perl (20120324) unstable; urgency=low * Add package scripts, make them work with Debian 5/6. -- Thomas E. Dickey Sun, 18 Mar 2012 14:25:35 -0400 libcdk-perl (4.9.10-5) unstable; urgency=low [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ Dominic Hargreaves ] * Add Depends on libperl4-corelibs-perl (will fix lintian warning perl-module-uses-perl4-libs-without-dep once #648532 has been fixed) * Update Standards-Version (no changes) * Switch to dpkg-source 3.0 (quilt) format, restoring the application of patches lost in 4.9.10-4 -- Dominic Hargreaves Sat, 12 Nov 2011 16:43:21 +0000 libcdk-perl (4.9.10-4) unstable; urgency=low * Move changes to upstream code under debian/patches; add quilt framework. * Add debian/README.source to document quilt usage, as required by Debian Policy since 3.8.0. * debian/control: Changed: Switched Vcs-Browser field to ViewSVN (source stanza). * debian/control: Added: ${misc:Depends} to Depends: field. * New patch cdkdemo_help.patch to change default path for help system in cdkdemo; thanks to Rafael Laboissiere for the bug report (closes: #519820). * Don't install README anymore. * Switch to debhelper 7, adjust debian/{rules,compat,control}. * Set Standards-Version to 3.8.2 (no further changes). * Add /me to Uploaders. * debian/copyright: switch to new format. -- gregor herrmann Sun, 09 Aug 2009 16:36:30 +0200 libcdk-perl (4.9.10-3) unstable; urgency=low [ gregor herrmann ] * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza); Homepage field (source stanza). Removed: Homepage pseudo-field (Description); XS-Vcs-Svn fields. * debian/rules: delete /usr/share/perl5 only if it exists. [ Damyan Ivanov ] * Standards-Version: 3.7.3 (no changes) * debhelper compatibility level 6 * debian/rules: + make it like the current dh-make-perl templates * add myself to Uploaders -- Damyan Ivanov Mon, 21 Jan 2008 11:41:29 +0200 libcdk-perl (4.9.10-2) unstable; urgency=low * Adopted orphaned package for Debian Perl Group (Closes: #279778) * Added myself to Uploaders * Do not ignore $(MAKE) clean errors in debian/rules * Corrected Homepage in debian/control * Removed emtpy /usr/share/perl5 * Fixed debian/watch * Bumped debhelper version in debian/compat to 5 * Changed >> to >= in Build-Depends * Updated Standards-Version to 3.7.2 from 3.6.2 (no changes) -- Jeremiah Foster Tue, 14 Aug 2007 12:39:04 +0000 libcdk-perl (4.9.10-1) unstable; urgency=low * QA upload. * Package is orphaned (see #279778); set maintainer to Debian QA Group. * New upstream release. - Links against libcdk5 rather than libcdk4. - Fixes the matrix widget. Closes: #179540. * Cdk/Viewer.pm: Fix copy-paste error that prevented bind() from working. Thanks to Mathew White for the patch. Closes: #312733. * Change section to perl in accordance with the override file. * Update description. Closes: #205877. * debian/copyright: - Include original copyright and license. Closes: #236488. - Update upstream URL. * debian/rules: Leave examples uncompressed. * debian/watch: Add. * Conforms to Standards version 3.6.2. -- Matej Vela Mon, 31 Oct 2005 13:09:31 +0100 libcdk-perl (4.9.7-6) unstable; urgency=low * Redo the hppa specific inclusion of -ffunction-sections as $Config::Config{archname} has changed. -- Stephen Zander Tue, 5 Nov 2002 01:37:34 -0800 libcdk-perl (4.9.7-5) unstable; urgency=low * Rebuild for perl 5.8; adjust Build-Depends appropriately -- Stephen Zander Tue, 3 Sep 2002 07:32:33 -0700 libcdk-perl (4.9.7-4) unstable; urgency=low * Add -ffunction-sections for hppa architecture, Closes: #134027 -- Stephen Zander Fri, 17 May 2002 16:23:35 -0700 libcdk-perl (4.9.7-3) unstable; urgency=high * Fix Section: override. * Set urgency=high to ensure package moves to testing more quickly -- Stephen Zander Fri, 28 Dec 2001 12:43:36 -0800 libcdk-perl (4.9.7-2) unstable; urgency=low * New maintainer, Closes: #123489 * Updated for policy 3.5.6 and the new perl packaging policy, Closes: #80683, #95406 * Builds cleanly on sparc & hppa, Closes: #89292, #104886 * No longer build libcdk-perl-examples, Closes: #118225 -- Stephen Zander Fri, 28 Dec 2001 09:57:48 -0800 libcdk-perl (4.9.7-1) unstable; urgency=low * New upstream version. -- Raphael Bossek Sat, 15 Jan 2000 12:51:09 +0100 cdk-perl-20150928/package/debian/compat0000644000175100001440000000000211657507064016234 0ustar tomusers7 cdk-perl-20150928/package/debian/copyright0000644000175100001440000000577112171574621016776 0ustar tomusersFormat-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 Upstream-Maintainer: Thomas Dickey Upstream-Source: http://invisible-island.net/cdk/ Upstream-Name: Cdk Files: * Copyright: 1995-1999, Mike Glover 1999-2012, 2013 Thomas Dickey License: BSD-4 Files: debian/* Copyright: 2000, Raphael Bossek 2001, 2002, Stephen Zander 2005, Matej Vela 2007, Jeremiah Foster 2008, 2009, gregor herrmann 2008, Damyan Ivanov License: Artistic | GPL-1+ License: BSD-4 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: This product includes software developed by Mike Glover and contributors. . 4. Neither the name of Mike Glover nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY MIKE GLOVER AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MIKE GLOVER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. On Debian GNU/Linux systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic' License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL' cdk-perl-20150928/demos/0000755000175100001440000000000012171570657013330 5ustar tomuserscdk-perl-20150928/demos/pkgInfo0000755000175100001440000001600212171570657014652 0ustar tomusers#!/usr/bin/perl -w # $Id: pkgInfo,v 1.5 2013/07/17 19:34:07 tom Exp $ use strict; # # This script provides a user interface to packages on the system. # use Cdk; Cdk::init(); # Create a dialog box with options. my @dialogMessge = ( "Unix Package Interface", "Select an option." ); # Create the buutons for the dialog box. my @buttons = ( "", "", "", "" ); # Create the dialog widget. my $dialog = new Cdk::Dialog( 'Message' => \@dialogMessge, 'Buttons' => \@buttons ); # Do this forever. for ( ; ; ) { # Activate the dialog box. my $choice = $dialog->activate(); next if !defined $choice; # Check the answer. if ( $choice == 0 ) { addPackage(); } elsif ( $choice == 1 ) { removePackage(); } elsif ( $choice == 2 ) { packageInfo(); } elsif ( $choice == 3 ) { # Exit. Cdk::end(); exit; } } # # This function adds a package. # sub addPackage { my @packageList = (); my $x; # Set up the entry field. my $mesg = "Enter the source package directory:"; my $entry = new Cdk::Entry( 'Label' => $mesg, 'Max' => 512, 'Width' => 30 ); # Get the package directory. my $pkgDir = $entry->activate(); return if !defined $pkgDir; # Open the given directory. if ( !opendir( DIR, $pkgDir ) ) { # Couldn't open the directory. my @mesg = ( "Error", "Could not open the directory $pkgDir", "$!", "", "Press any key to continue." ); my $label = new Cdk::Label( 'Message' => \@mesg ); $label->draw(); $label->wait(); return; } # Get the directory listing of the given directory. my @contents = readdir(DIR); closedir(DIR); # Create a list of all of the directories under the given directory. foreach my $file (@contents) { next if $file =~ /^\./; push( @packageList, $file ) if ( -d "$pkgDir/$file" ); } # Create a selection list and display the known packages. my $select = new Cdk::Selection( 'Title' => "Add Which Packages?", 'List' => \@packageList, 'Choices' => [ "Yes ", "No" ], 'Height' => 20, 'Width' => 50 ); # Activate the packages. my @choiceList = $select->activate(); my @selectedPackages = (); return if !@choiceList; # Generate the names of the selected packages. for ( $x = 0 ; $x <= $#choiceList ; $x++ ) { if ( $choiceList[$x] == 1 ) { push( @selectedPackages, $packageList[$x] ); } } my $label = new Cdk::Label( 'Message' => \@selectedPackages ); $label->draw(); $label->wait(); } # # This function removes a package. # sub removePackage { # Get the packages to remove. my @packageNames = selectPackages("Select the packages to delete."); my @buttons = ( "", "", "" ); my $yesToAll = 0; # Now that we have the package names, ask for each one. foreach my $name (@packageNames) { # If they asked for all to be deleted, no need to ask if ( !$yesToAll ) { # Create the dialog message. my @mesg = ( "Are you sure you want", "to delete the package $name?" ); # Make sure they want to do it. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons ); # Activate it. my $answer = $dialog->activate(); # If the user hit escape, let the user know the package # was NOT deleted. if ( !defined $answer ) { popupLabel( [ "Escape Hit", "The package was Not deleted." ] ); next; } # Check the answer if ( $answer == 1 ) { # Delete the package popupLabel("pkgrm $name"); } else { # Set the yes to all flag. $yesToAll = 1; # Delete the package popupLabel("pkgrm $name"); } } else { # Delete the package popupLabel("pkgrm $name"); } } } # # This function provides information about packages. # sub packageInfo { # Get the package to view. my $packageName = selectPackage("Select a package to view."); # Get the information about the selected package. my @pinfo = qx (pkginfo -l $packageName); chomp @pinfo; # Create the information viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => -2, 'Width' => -4 ); # Activate the viewer. $viewer->set( 'Title' => "Package Name: $packageName", 'Info' => \@pinfo, 'Interp' => "FALSE" ); $viewer->activate(); } # # This function creates a scrolling list of all the packages on the system # and returns the name of the package selected. # sub selectPackage { my $title = shift; # Get a list of all the packages installed on the system. my @packageList = qx (pkginfo); my @packageNames = (); # Strip out the names of the packages. foreach my $PKG (@packageList) { my $pkgName = ( split( /\s+/, $PKG ) )[1]; push( @packageNames, $pkgName ); } # Create the scrolling list. my $packageList = new Cdk::Scroll( 'Title' => $title, 'List' => \@packageNames, 'Numbers' => "TRUE", 'Height' => 20, 'Width' => 50 ); # Return the selected name. my $choice = $packageList->activate(); return ( $packageNames[$choice] ); } # # This function creates a selection list of all the packages on the system # and returns the name of the package selected. # sub selectPackages { my $title = shift; my @options = qw (Keep Delete); my @selectedNames = (); # Get a list of all the packages installed on the system. my @packageList = qx (pkginfo); my @packageNames = (); my @selectedPackages = (); my $x = 0; # Strip out the names of the packages. foreach my $PKG (@packageList) { my $pkgName = ( split( /\s+/, $PKG ) )[1]; push( @packageNames, $pkgName ); } # Create the selection list. my $select = new Cdk::Selection( 'Title' => $title, 'List' => \@packageNames, 'Choices' => \@options, 'Height' => 20, 'Width' => 50 ); # Activate the selection list. my @list = $select->activate(); # Generate the names of the selected packages. for ( $x = 0 ; $x <= $#packageNames ; $x++ ) { if ( $list[$x] == 1 ) { push( @selectedPackages, $packageNames[$x] ); } } return (@selectedPackages); } cdk-perl-20150928/demos/pwdInfo0000755000175100001440000000355712171570657014676 0ustar tomusers#!/usr/bin/perl -w # $Id: pwdInfo,v 1.4 2013/07/17 19:34:07 tom Exp $ # # This reads the passwd file and creates an interface to browse the # information. # use strict; use Cdk; Cdk::init(); # # This function loads up the passwd file and returns a reference to the # data structure. # sub loadPasswd { my %passwd = (); my @logins = (); my ( $name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell ); # Start reading through the passwd file. while ( ( $name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell ) = getpwent ) { # Store the information. $passwd{$name} = "$uid$gid$comment$gcos$dir$shell"; push( @logins, $name ); } return ( \@logins, \%passwd ); } # Load up the passwd file. my ( $logins, $passwdObject ) = loadPasswd(); # Create a scrolling list of all the names. my $mainScroll = new Cdk::Scroll( 'Title' => 'Pick An Account', 'Numbers' => "TRUE", 'List' => $logins, 'Height' => 13, 'Width' => 45 ); # Do this forever. for ( ; ; ) { # Let the user select the login to view. my $selected = $mainScroll->activate(); # Did the user just hit escape? if ( !defined $selected ) { Cdk::end(); exit 0; } # Get the name and display the info. my $name = $logins->[$selected]; # Display the info. my ( $uid, $gid, $comment, $gcos, $dir, $shell ) = split( //, $passwdObject->{$name} ); my $info = [ "Account Name : $name", "UID/GID : ($uid/$gid)", "Comment : $comment", "GCOS Value : $gcos", "Home Directory : $dir", "Shell : $shell" ]; my $title = new Cdk::Label( 'Message' => $info ); # Draw the label. $title->draw( 'Box' => "TRUE" ); $title->wait(); undef $title; } cdk-perl-20150928/demos/perlbug0000755000175100001440000003041612171570656014721 0ustar tomusers#!/usr/bin/perl -w # $Id: perlbug,v 1.6 2013/07/17 19:34:06 tom Exp $ # # Purpose: # This 'rips' off Larry's perlbug from the utils directory. use strict; # Determine if the user has one of the mail modules. BEGIN { eval "use Mail::Send;"; $::HaveSend = ( $@ eq "" ); } use Config; use Sys::Hostname; use Getopt::Std; our ( $opt_a, $opt_c, $opt_f, $opt_h, $opt_r, $opt_s, $opt_v ); our $cc; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create global variables. my ($Version) = "1.00"; my $address = "perlbug\@perl.com"; # Check the command line arguments. getopts("c:a:f:r:s:vh"); # Did they ask for help? if ( defined $opt_h ) { my @help = ( "Perl Bug Reporting Facility Help Window.", "Usage: $0 [-c CC] [-a Admin Account]", " [-r Reply Account] [-s subject]", " [-f filename] [-v] [-h]", "", " The account to carbon copy to.", " The perl admin account.", " The account to reply to.", " The subject of the bug report.", " The file to read in as the bug report.", " Turns on verbose output for the bug report.", " Pops up this help window.", "", "Press Any Key To Continue." ); popupLabel( \@help ); } # Create a program information message. my @progInfo = ( "Perl Bug Reporting Facility", "Version $Version", "", "This program allows you to create a bug report which will be", "mailed to $address once the report has been filled out.", "", "Hit any key when you are ready to start." ); popupLabel( \@progInfo ); # Create the generic label. my @mesg = ( "******************************************************", "******************************************************", "******************************************************", "******************************************************" ); my $mainTitle = new Cdk::Label( 'Message' => \@mesg, 'Xpos' => "TOP" ); # Get the subject to the mail message. my $subject = $opt_s || getSubject($mainTitle); my $verbose = $opt_v; # Get the reply address. @mesg = ( "Return Email Address", "Enter your return e-mail address." ); my $defaultReplyAddress = getlogin() . "@" . hostname() . "."; my $replyAddress = $opt_r || getEmailAddress( $mainTitle, $defaultReplyAddress, @mesg ); # Get the perl admin address. @mesg = ( "Perl Admin Email Address", "Enter the email address of the perl admin." ); my $defaultAdminAddress = $::Config{perladmin}; my $adminAddress = $opt_a || getEmailAddress( $mainTitle, $defaultAdminAddress, @mesg ); # Create the bug report. my @report = createBugReport( $mainTitle, $subject, $opt_f ); # View the bug report. viewBugReport( $subject, $replyAddress, $adminAddress, $cc, @report ); exit; ############################################################################ # # This gets the subject to the bug report. # sub getSubject { my $mainTitle = shift; # Create the subject entry field. my $entry = new Cdk::Entry( 'Label' => "Subject: ", 'Width' => 35, 'Min' => 3, 'Max' => 256 ); # Set the main title info. @mesg = ( "Enter Subject", "Please provide a subject for the message. It", "should be as a concise description of the bug", "as is possible." ); $mainTitle->set( 'Message' => \@mesg ); $mainTitle->draw(); # Get the subject. while (1) { my $subject = $entry->activate(); last if defined $subject; # No subject, prompt them for one... popupLabel( [ "Error", "You must have a subject line for the mail message.", "", "Please try again." ] ); } return $subject; } ############################################################################ # # This gets an emial address. # sub getEmailAddress { my ( $mainTitle, $entryValue, @mesg ) = @_; my $info; # Set the main title info. $mainTitle->set( 'Message' => \@mesg ); # Create the entry field to get the email address. my $entry = new Cdk::Entry( 'Label' => "email Address: ", 'Min' => 3, 'Max' => 256, 'Width' => 35 ); # Put the user name in the entry field. $entry->set( 'Value' => "$entryValue" ); # Get the emial address while (1) { $info = $entry->activate(); last if defined $info; # No subject, prompt them for one... popupLabel( [ "Error", "You must provide an email address.", "", "Please Try again." ] ); } return $info; } ############################################################################ # # This gets the bug report from the user. # sub createBugReport { my ( $mainTitle, $subject, $filename ) = @_; my @bugReport = (); my @info = (); my $info; # If a filename has been speicifed, then we will use the contents of the # file for the bug report. if ( defined $filename && -e $filename ) { open( FILE, $filename ); my @tmp = ; chomp(@tmp); return @tmp; } # Create the title. my @mesg = ( "Bug Report", "Enter a description of the bug you are submitting." ); # Set the main title info. $mainTitle->set( 'Message' => \@mesg ); # Create the entry field to get the email address. my $entry = new Cdk::Mentry( 'Label' => "Description: ", 'Prows' => 8, 'Lrows' => 15, 'Width' => 50 ); # Get the bug report. while (1) { $info = $entry->activate(); last if defined $info; # No subject, prompt them for one... popupLabel( [ "Error", "You must provide a description of the bug.", "", "Please Try again." ] ); } # Split the string into a list. @info = Cdk::scalar2List( $info, 40 ); # Create the bug report. my $from = `whoami`; push( @bugReport, "This is a bug report for perl from $from generated with" ); push( @bugReport, "the help of the Cdk version of perlbug running under perl $]." ); push( @bugReport, "" ); push( @bugReport, "Subject: $subject" ); push( @bugReport, "" ); for ( my $x = 0 ; $x <= $#info ; $x++ ) { push( @bugReport, $info[$x] ); } push( @bugReport, "" ); push( @bugReport, "Site configuration information for perl $]:" ); if ( $::Config{cf_by} and $::Config{cf_time} ) { push( @bugReport, "Configured by $::Config{cf_by} at $::Config{cf_time}." ); } push( @bugReport, "" ); foreach ( split( /\n/, Config::myconfig ) ) { push( @bugReport, $_ ); } # Do they want a verbose bug report? if ($::opt_v) { push( @bugReport, "" ); push( @bugReport, "Complete configuration data for perl $]:" ); push( @bugReport, "" ); foreach ( sort keys %::Config ) { my $value = $::Config{$_}; $value =~ s/'/\\'/g; push( @bugReport, "$_='$value'" ); } } return @bugReport; } ############################################################################ # # This views the bug report. # sub viewBugReport { my ( $subject, $replyAddress, $adminAddress, @bugReport ) = @_; my @buttons = ("OK"); # Get the height and width of the screen. my ( $height, $width ) = Cdk::getCdkScreenDim(); $height -= 3; $width -= 3; # Create the file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => \@buttons, 'Height' => $height, 'Width' => $width ); # Fill the viewer with the contents of the bug report. $viewer->set( 'Title' => "Bug Report", 'Highlight' => "", 'Info' => \@bugReport ); $viewer->activate(); # Ask them what they want to do with the bug report. my @mesg = ( "Now that the bug report has been created, you can", "send the bug report to $replyAddress and $adminAddress,", "or you can save the report to a file and send it later", "on your own, or you can quit without saving or sending", "the bug report." ); @buttons = ( "Send", "Save", "Cancel" ); my $choice = popupDialog( \@mesg, \@buttons ); # Redraw the viewer widget. $viewer->draw(); # Check what they want to do. if ( $choice == 0 ) { # Mail to bug report. sendBugReport( $subject, $replyAddress, $adminAddress, @bugReport ); } elsif ( $choice == 1 ) { # Save to a file. saveBugReport(@bugReport); } else { popupLabel( ["Send Bug Report Canceled."] ); } } # # This saves the bug report to a file. # sub saveBugReport { my @bugReport = @_; my $filename; # Get the filename to save to. my $entry = new Cdk::Entry( 'Label' => "Filename: ", 'Width' => 30, 'Min' => 2, 'Max' => 256 ); # Make sure we can write to the file. while (1) { # Get the filename. $filename = $entry->activate(); # Try to open the filename. last if open( FILE, ">$filename" ); popupLabel( [ "Error", "Can not save to the file $filename" ] ); } # Save the bug report to the file. foreach (@bugReport) { print FILE "$_\n"; } close(FILE); # Tell the user the file has been saved. popupLabel( [ "The bug report has been saved to $filename", "", "Press any key to continue." ] ); } # # This sends the bug report to the given addresses. # sub sendBugReport { my ( $subject, $replyAddress, $adminAddress, $cc, @bugReport ) = @_; my $address = "perlbug\@perl.com"; # Do we have the sendmail module? if ($::HaveSend) { # Create a mail object. my $mailMessage = new Mail::Send( 'Subject' => "$subject", 'To' => "$address" ); # Add a carbon copy, if we have one. $mailMessage->cc($cc) if $cc; # Add a from line. $mailMessage->add( "Reply-To" => $replyAddress ) if $replyAddress; # Open the mail message and write the contents. my $fh = $mailMessage->open; foreach (@bugReport) { print $fh "$_\n"; } # Close the mail message (aka send it.) $fh->close; # Popup a little message. popupLabel( ["The bug report has been sent."] ); return; } else { # No, Okay, let's try to use sendmail normally. (normally????) my $sendmail = ""; # Where oh where are you you today... foreach (qw(/usr/lib/sendmail /usr/sbin/sendmail /usr/ucblib/sendmail)) { $sendmail = $_, last if -e $_; } # Can we even send the bug report? if ( $sendmail eq "" ) { # We can't send the bug report, maybe we can save it to a file. my @mesg = ( "Hmmmm.", "I'm terribly sorry but I can't find sendmail and the package", "Mail::Send has not been installed, so I can't send your bug", "report. Since I can't send the bug report, would you like to", "save it to a file and send it yourself?" ); if ( popupDialog( \@mesg, [ "Yep", "Nope" ] ) == 0 ) { saveBugReport(@bugReport); } return; } # Send the message via sendmail. open( SENDMAIL, "|$sendmail -t" ); print SENDMAIL "To: $address\n"; print SENDMAIL "Subject: $subject\n"; print SENDMAIL "Cc: $cc\n" if $cc; print SENDMAIL "Reply-To: $replyAddress\n" if $replyAddress; print SENDMAIL "\n\n"; foreach (@bugReport) { print SENDMAIL "$_\n"; } close(SENDMAIL); # Popup a little message. popupLabel( ["The bug report has been sent."] ); } } cdk-perl-20150928/demos/workman0000755000175100001440000000613612170613375014734 0ustar tomusers#!/usr/bin/perl -w # $Id: workman,v 1.3 2013/07/14 21:24:13 tom Exp $ # # Initialize Cdk. # use strict; use Cdk; Cdk::init(); # Pop up the opening label. popupLabel( [ "Workman Database Editor.", "", "Written By Mike Glover" ] ); # Set a default name for the workman database. my $workmandb = $ENV{'HOME'} . "/.workmandb"; # Open up the database and read in the contents. my @cdList = readWorkmanDatabase($workmandb); # Let the user play with the given information. playWithWorkManDatabase(@cdList); # # This allows the user to manipulate the workman database. # sub playWithWorkManDatabase { } # # This reads in the current contents of the workman database. # sub readWorkmanDatabase { my $filename = shift; my @contents = (); my $count = 0; my $x = 0; # Return if we can't open the file. return if !( open( FILE, $filename ) ); # Slurp in the file. my @workmandb = ; chomp @workmandb; # Strip out the contents of the database. for ( $x = 0 ; $x < $#workmandb ; $x++ ) { # Remove comments and empty lines. next if $workmandb[$x] =~ /^#/; next if $workmandb[$x] =~ /^$/; # Is this a start of a CD listing. if ( $workmandb[$x] =~ /^tracks (\d*)/ ) { my $trackCount = $1; my $trackLine = $workmandb[ $x++ ]; my $cdName = $workmandb[ $x++ ]; my $artist = $workmandb[ $x++ ]; my @tracks = (); my $current = 0; # Get each track from the database. for ( $current = 0 ; $current < $trackCount ; $current++ ) { push( @tracks, $workmandb[ $x++ ] ); } $x--; # Create the database object and put it onto the stack. my $object = new WorkManData( $trackLine, $cdName, $artist, @tracks ); # Put it onto the stack. push( @contents, $object ); } } return @contents; } # # This writes out a workman database. # sub writeWorkManData { } ######################################### package WorkManData; # # This creates a new object. # sub new { my ( $type, $trackLine, $cdName, $artist, @tracks ) = @_; my @trackInfo = (); my @indexInfo = (); my $self = {}; # Split the trackline apart. my ( $junk, $trackCount, @index ) = split( /\s+/, $trackLine ); # Clean off the garbage from the track lines. for ( my $x = 0 ; $x <= $#tracks ; $x++ ) { # Strip out the track name. my $trackName = $1 if $tracks[$x] =~ /^track\s+(.*)/; # If there is no track name, then provide a default answer. if ( $trackName ne "" ) { push( @trackInfo, $trackName ); } else { push( @trackInfo, "No Track Name Given" ); } } # Store the info in the object. ( $self->{'Artist'} = $1 ) if $artist =~ /^artist\s+(.*)/; ( $self->{'CDName'} = $1 ) if $cdName =~ /^cdname\s+(.*)/; $self->{'Tracks'} = \@trackInfo; $self->{'Index'} = \@indexInfo; return bless $self; } cdk-perl-20150928/demos/bday0000755000175100001440000000513512171562222014166 0ustar tomusers#!/usr/bin/perl -w # $Id: bday,v 1.7 2013/07/17 18:38:10 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Calendar Widget use strict; # Set some global variables. my %birthdays = (); my %appointments = (); my %anniversay = (); # Initialize Cdk. use Cdk; Cdk::init(); # Create the calendar object. my $calendar = new Cdk::Calendar( 'Dattrib' => "", 'Mattrib' => "", 'Yattrib' => "", 'Highlight' => "" ); # Create the scrolling window. my $swindow = new Cdk::Swindow( 'Title' => "Date Information", 'Lines' => 300, 'Height' => 4, 'Width' => 50, 'Ypos' => "BOTTOM" ); # Set the key binding for the calendar widget. $calendar->bind( 'Key' => "m", 'Function' => sub { setMarkerCB($calendar); } ); # Set the post-process function for the calendar widget. $calendar->postProcess( 'Function' => sub { checkDatePP($calendar); } ); # Draw the scrolling window. $swindow->draw(); # Let the user play. for ( ; ; ) { # Activate the object. my ( $day, $month, $year ) = $calendar->activate(); last if not defined $day; last if not defined $month; last if not defined $year; my $msg = sprintf "day %2d, month %2d, year %4d", $day, $month, $year; $swindow->addline( 'Info' => $msg ); } # Exit Cdk. Cdk::end(); # # This checks if the current date has a marker set on it. # sub checkDatePP { my $calendar = shift; } # # This allows the user to create a marker. # sub setMarkerCB { my $calendar = shift; my @mesg = ("What type of a marker is it?"); my @buttons = ( "Birthday", "Anniversary", "Appointment" ); # Get the current date the marker is at. my ( $day, $month, $year ) = $calendar->getDate(); # Ask the user what type of marker to add. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons ); my $choice = $dialog->activate(); undef $dialog; # If they hit escape, tell them... if ( !defined $choice ) { popupLabel( ["Escape Hit. No marker set."] ); $calendar->draw(); return 1; } # Check the choice. if ( $choice == 0 ) { addBirthdayMarker( $day, $month, $year ); } elsif ( $choice == 1 ) { addAnniversaryMarker( $day, $month, $year ); } elsif ( $choice == 2 ) { addAppointmentMarker( $day, $month, $year ); } return 1; } # # # sub addBirthdayMarker { my ( $day, $month, $year ) = @_; } # # # sub addAnniversaryMarker { my ( $day, $month, $year ) = @_; } # # # sub addAppointmentMarker { my ( $day, $month, $year ) = @_; } cdk-perl-20150928/demos/async0000755000175100001440000000377412171570656014405 0ustar tomusers#!/usr/bin/perl -w # $Id: async,v 1.4 2013/07/17 19:34:06 tom Exp $ # # This demo demonstrates how to use async functions with Cdk... # use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set the async function... $SIG{'ALRM'} = "littleWeeClock"; our @listItems; # Set up the scrolling list. setpwent(); while ( my $item = getpwent() ) { push( @listItems, $item ); } # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Create the scrolling list object. my $scroll = new Cdk::Scroll( 'Title' => "Pick An Account", 'Height' => 10, 'Numbers' => "TRUE", 'Highlight' => "", 'Width' => 25, 'List' => \@listItems ); # Create the label... my $clock = new Cdk::Label( 'Message' => ["Current Time: HH:MM:SS"], 'Xpos' => "TOP" ); # Draw the scrolling window. $clock->draw(); # Set the alarm to go off. alarm(1); # Do this forever. for ( ; ; ) { # Activate the scrolling list. my $itemPicked = $scroll->activate(); # Do we need to exit... exit if !defined $itemPicked; # Get the password info. my ( $name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell ) = getpwnam( $listItems[$itemPicked] ); # Display it. my $info = [ "Account Name $name", "UID $uid", "GID $gid", "Directory $dir", "Shell $shell" ]; popupLabel($info); } # Exit Cdk. Cdk::end(); # # This is the async function. # sub littleWeeClock { # # Turn off the alarm # $SIG{'ALRM'} = "IGNORE"; alarm(0); # # Get the current time/date. # my ( $sec, $min, $hour ) = ( localtime(time) ); my $mesg = sprintf( "%02d:%02d:%02d", $hour, $min, $sec ); # # Add the line to the scrolling window. # $clock->set( 'Message' => ["Current Time: $mesg"] ); # # Reset the alarm. # $SIG{'ALRM'} = "littleWeeClock"; alarm(1); } cdk-perl-20150928/demos/rolodex0000755000175100001440000007310412171570610014724 0ustar tomusers#!/usr/bin/perl -w # $Id: rolodex,v 1.5 2013/07/17 19:33:28 tom Exp $ use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Declare global variables. our $GGroupInfoChanged = 0; our @GLineType = ( "Voice", "Cell", "Pager", "First FAX", "Second FAX", "Third FAX", "First Data Line", "Second Data Line", "Third Data Line" ); # Create the menu list items. our $fMenu = [ "File", "Open ", "Save ", "Save As", "Quit " ]; our $eMenu = [ "Groups", "New ", "Open ", "Delete" ]; our $pMenu = [ "Print", "Print Rolodex" ]; our $hMenu = [ "Help", "About Rolodex ", "Rolodex Statistics" ]; our $menulist = [ $fMenu, $eMenu, $pMenu, $hMenu ]; our $menuloc = [ "LEFT", "LEFT", "LEFT", "RIGHT" ]; # Create the menu object. our $menu = new Cdk::Menu( 'Menulist' => $menulist, 'Menuloc' => $menuloc ); $menu->activate(0); # Create the title. our @title = ( "Cdk/Perl5 Rolodex", "Written by Mike Glover" ); our $rolodexTitle = new Cdk::Label( 'Message' => \@title, 'Box' => "FALSE" ); $rolodexTitle->draw( "Box" => "FALSE" ); # Load up the RC file. our $filename = $ENV{"HOME"} . "/.rolorc"; our $dbmDir = $ENV{"HOME"} . "/.rolodex"; our %groupInfo = readRCFile($filename); our $groupCount = keys %groupInfo; # Pop up a message stating how many groups were loaded. if ( $groupCount == 0 ) { my $groupMessage = [ "Empty rolodex RC file. No groups loaded.", "Press any key to continue." ]; popupLabel($groupMessage); } elsif ( $groupCount == 1 ) { my $groupMessage = [ "There was 1 group loaded from the RC file.", "Press any key to continue." ]; popupLabel($groupMessage); } else { my $groupMessage = [ "There were $groupCount groups loaded from the RC file.", "Press any key to continue." ]; popupLabel($groupMessage); } # Start the main loop for ( ; ; ) { # Activate the object. my ( $menuItem, $submenuItem ) = $menu->activate(); # Make sure they didn't hit escape. next if !defined $menuItem; # Determine which menuitem was selected. if ( $menuItem == 0 ) { if ( $submenuItem == 1 ) { # Open a new RC file. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Height' => 20, 'Width' => 55 ); my $file = $fselect->activate(); undef $fselect; # Make sure they chose a file. if ( defined $file ) { my %tmpGroup = readRCFile($file); # Check the results. if ( !defined %tmpGroup ) { my $mesg = [ "There were too many errors in the file", "$file.", "Are you sure it is a rolodex RC file?" ]; popupLabel($mesg); } else { %groupInfo = %tmpGroup; } } } elsif ( $submenuItem == 2 ) { # Save the RC file. saveRCFile( $filename, %groupInfo ); } elsif ( $submenuItem == 3 ) { # Save As... my $entry = new Cdk::Entry( 'Label' => "Save As", 'Max' => 256, 'Width' => 20, 'Min' => 2, 'Filler' => "_" ); $filename = $entry->activate(); # Check if they supplied a value. if ( !defined $filename ) { my $mesg = [ "No name provided.", "Information not saved." ]; popupLabel($mesg); } else { saveRCFile( $filename, %groupInfo ); } undef $entry; } elsif ( $submenuItem == 4 ) { # Quit saveRCFile( $filename, %groupInfo ) if $GGroupInfoChanged == 1; exit; } } elsif ( $menuItem == 1 ) { if ( $submenuItem == 1 ) { my %tmp = addRolodexGroup(%groupInfo); %groupInfo = %tmp; } elsif ( $submenuItem == 2 ) { useRolodexGroup(%groupInfo); } elsif ( $submenuItem == 3 ) { my %tmp = deleteRolodexGroup(%groupInfo); %groupInfo = %tmp; } } elsif ( $menuItem == 2 ) { printRolodexGroups(%groupInfo); } elsif ( $menuItem == 3 ) { if ( $submenuItem == 1 ) { # About rolodex. my $roloInfo = [ "About Cdk/Perl5 Rolodex", "", "This demo was written to demonstrate the widgets", "available with the Cdk Perl5 extension. Not all of", "the Cdk widgets are used, but most of them have", "been. I hope this little demonstration helps give", "you an understanding of what the Cdk Perl5", "extension offers.", "Have fun with it.", "", "ttfn,", "Mike", "<#HL(30)>", "March 1996" ]; popupLabel($roloInfo); } elsif ( $submenuItem == 2 ) { # Rolodex statistics. my $groupCount = keys %groupInfo; my $roloInfo = [ "Rolodex Statistics", "Read Command Filename $filename", "Group Count $groupCount" ]; popupLabel($roloInfo); } } } # # This reads an RC file. # sub readRCFile { my $filename = shift; my %groupList = (); # Open the RC file. open( FILE, $filename ) || return ( 0, "" ); # Start ripping through the file. for my $row () { # Ingore comments and white space. next if ( $row =~ /^#/ ); next if ( $row =~ /^$/ ); chomp $row; # Split the line. my @tmp = split( //, $row ); # Check if the file is in the correct format. if ( $#tmp == 2 ) { $groupList{ $tmp[0] } = "$tmp[1]$tmp[2]"; } } return %groupList; } # # This saves the group information to a RC file. # sub saveRCFile { my ( $filename, %info ) = @_; my $date = qx (date); my $count = 0; # Open the file. if ( !open( FILE, ">$filename" ) ) { my $mesg = [ "Could not write RC file to", "$filename", "Try Save As option." ]; popupLabel($mesg); return; } # Attach the header to the file. print FILE "#\n"; print FILE "# This file was automatically created on $date"; print FILE "#\n"; # Start writing the info to the file. foreach my $name ( keys %info ) { print FILE "$name$info{$name}\n"; $count++; } # Close the file. close(FILE); # Pop up a little message. if ( $count == 1 ) { my $mesg = [ "There was 1 group saved to file", "$filename", "Press any key to continue." ]; popupLabel($mesg); } else { my $mesg = [ "There were $count groups saved to file", "$filename", "Press any key to continue." ]; popupLabel($mesg); } # Reset the global flag. $GGroupInfoChanged = 0; return; } # # This adds a new rolodex group to the current list of rolodex groups. # sub addRolodexGroup { my (%info) = @_; my $description; # Create the entry fields. my $name = new Cdk::Entry( 'Label' => " New Group Name", 'Width' => 20, 'Filler' => "_", 'Min' => 2, 'Max' => 256, 'Ypos' => 8 ); my $desc = new Cdk::Entry( 'Label' => "Group Description", 'Width' => 20, 'Filler' => "_", 'Min' => 2, 'Max' => 256, 'Ypos' => 11 ); # Get the group name. my $newName = $name->activate(); # Did they send in a name. if ( !defined $newName ) { my $mesg = [ "No name provided.", "Group not added." ]; popupLabel($mesg); return %info; } else { # Check if the group already exists. if ( defined $info{$newName} ) { my $mesg = ["Sorry the group ($newName) already exists."]; popupLabel($mesg); return %info; } } # Get the group description. while ( !defined $description ) { $description = $desc->activate(); # If there is no description given then tell them they need one. if ( !defined $description ) { popupLabel( ["The group has to have a description."] ); $name->draw(); } } # Create the DBM filename. my $dbm = "${dbmDir}/${newName}.phl"; # Add it to the groupList. $info{$newName} = "${description}${dbm}"; $GGroupInfoChanged = 1; return %info; } # # This allows a user to open and play with a rolodex group. # sub useRolodexGroup { my (%info) = @_; my @list = (); # Pick which group to open. my $name = pickRolodexGroup( "Open Rolodex Group", %info ); return if ( !defined $name ); # Read the group database. my $database = ( split( //, $info{$name} ) )[1]; my @rolodexData = readPhoneDataFile($database); # Create the list. for ( my $x = 0 ; $x <= $#rolodexData ; $x++ ) { my $name = $rolodexData[$x]->{'Name'}; my $type = $GLineType[ $rolodexData[$x]->{'Type'} ]; push( @list, "$name ($type)" ); } my $height = ( $#rolodexData > 5 ? 8 : $#rolodexData + 4 ); # Create the help window. my $helpMesg = [ "<#HL(30)", "Press ? to get detailed help.", "<#HL(30)>" ]; my $helpWindow = new Cdk::Label( 'Message' => $helpMesg, 'Box' => "FALSE", 'Xpos' => "BOTTOM" ); $helpWindow->draw( 'Box' => "FALSE" ); # If the list if empty, ask them if they want to add an entry. if ( $#list < 0 ) { my $mesg = [ "There were no entries in this group.", "Do you want to add a new listng?" ]; my $buttons = [ "<>", "<>" ]; # Go ahead and ask. if ( popupDialog( $mesg, $buttons ) == 0 ) { # Get the new record. my $newRecord = getNewPhoneRecord(); if ( defined $newRecord ) { my $name = $newRecord->{'Name'}; my $type = $GLineType[ $newRecord->{'Type'} ]; $rolodexData[0] = $newRecord; push( @list, "$name ($type)" ); } else { return; } } else { return; } } # Create the scrolling list. my $scroll = new Cdk::Scroll( 'Title' => "Listing of Group $name", 'Height' => $height, 'Width' => 50, 'Numbers' => "TRUE", 'List' => \@list ); # Create a key binding for the widget. $scroll->bind( 'Key' => '?', 'Function' => sub { rolodexHelpCB(); } ); $scroll->bind( 'Key' => 'i', 'Function' => sub { insertPhoneEntryCB( $scroll, \@rolodexData, \@list ); } ); $scroll->bind( 'Key' => 'd', 'Function' => sub { deletePhoneEntryCB( $scroll, \@rolodexData, \@list ); } ); # Do this until they hit escape. for ( ; ; ) { # Let the user play. my $selection = $scroll->activate(); last if !defined $selection; # Display the phone record. displayPhoneRecord( $rolodexData[$selection] ); } # Save the information into the file. if ( !open( FILE, ">$database" ) ) { my $mesg = [ "Can not save phone information to", "$database", "$!", "Press any key to continue." ]; popupLabel($mesg); } # Start writing. my $date = qx (date); print FILE "#\n"; print FILE "# This file was automatically generated on $date"; print FILE "#\n"; for ( my $x = 0 ; $x <= $#rolodexData ; $x++ ) { my $object = $rolodexData[$x]; print FILE "$object->{'Name'}$object->{'Type'}$object->{'Number'}$object->{'Address'}$object->{'City'}$object->{'Province'}$object->{'Postal Code'}$object->{'Description'}\n"; } close FILE; undef $scroll; } # # This deletes a rolodex group from the given list. # sub deleteRolodexGroup { my (%info) = @_; # Pick which group to delete. my $name = pickRolodexGroup( "Delete Which Rolodex Group?", %info ); if ( !defined $name ) { my $mesg = [ " Delete Canceled ", "No Group Deleted" ]; popupLabel($mesg); return; } # Confirm the delete my $mesg = [ "Confirm Delete", "Are you sure you want to delete the group", "$name?" ]; my $buttons = [ "<>", "<>" ]; if ( popupDialog( $mesg, $buttons ) == 1 ) { # Delete the group. my $dbm = ( split( //, $info{$name} ) )[1]; delete $info{$name}; unlink $dbm; $GGroupInfoChanged = 1; } return %info; } # # This allows the user to pick a rolodex group. # sub pickRolodexGroup { my ( $title, %info ) = @_; my @list = (); my $height = keys %info; my @items = sort keys %info; # Create the scrolling list item list. foreach my $item (@items) { push( @list, "$item" ); } # Determine the height of the scrolling list. if ( $height > 5 ) { $height = 5; } $height += 3; # Create the scrolling list. my $scroll = new Cdk::Scroll( 'Title' => "$title", 'Height' => $height, 'Width' => 50, 'List' => \@list ); my $item = $scroll->activate(); return $items[$item] if ( defined $item ); return; } # # This reads a phone data file and stores it in an object. # sub readPhoneDataFile { my ($database) = @_; my @phoneRecords = (); # Open the database. if ( !open( DB, $database ) ) { my $mesg = [ "Error", "Could not open the database", "$database", "$!", "", "Press any key to continue." ]; popupLabel($mesg); return; } # Start scanning through the file. foreach my $row () { next if $row =~ /^#/; next if $row =~ /^$/; chomp $row; # Split the row and create an object. my $object = new PhoneData($row); push( @phoneRecords, $object ); } return @phoneRecords; } # # This is a callback to the scrolling list. # sub rolodexHelpCB { my $mesg = [ "Rolodex Phone Editor", "i Inserts a new phone entry.", "d Deletes the currently selected phone entry.", "Escape Exits the scrolling list.", "? Pops up this help window." ]; popupLabel($mesg); return 1; } # # This displays a phone record. # sub displayPhoneRecord { my $record = shift; my $type = $GLineType[ $record->{'Type'} ]; my $mesg = ""; # Assemble the phone record details. if ( $type =~ /cell/i || $type =~ /pager/i ) { $mesg = [ "$type Phone Record", "Name $record->{'Name'}", "Phone Number$record->{'Number'}", "Comment $record->{'Description'}" ]; } else { $mesg = [ "$type Phone Record", "Name $record->{'Name'}", "Phone Number$record->{'Number'}", "Address $record->{'Address'}", "City $record->{'City'}", "Province $record->{'Province'}", "Postal Code $record->{'Postal Code'}", "Comment $record->{'Description'}" ]; } popupLabel($mesg); } # # This gets a new phone record. # sub getNewPhoneRecord { my @list = (); my ( $record, $type ); # Create a list. foreach my $item (@GLineType) { push( @list, "$item" ); } # Create the title label. my $mesg = ["Add New Phone Record"]; my $title = new Cdk::Label( 'Message' => $mesg, 'Box' => "FALSE", 'Xpos' => "TOP" ); $title->draw( 'Box' => "FALSE" ); # Ask the user what type of line it it. my $itemList = new Cdk::Itemlist( 'Label' => "What Type Of Line Is It?", 'List' => \@list ); while ( !defined $type ) { $type = $itemList->activate(); if ( !defined $type ) { popupLabel( ["Please specify a line type."] ); } } undef $itemList; # Given the type, ask certain questions. if ( $GLineType[$type] =~ /Cell/ || $GLineType[$type] =~ /Pager/ ) { $record = getSmallPhoneRecord($type); } else { $record = getLargePhoneRecord($type); } return $record; } # # This gets a small phone record. # sub getSmallPhoneRecord { my $type = shift; my $mesg = [ "Confirm New Phone Entry", "Do you want to add this phone number?" ]; my $buttons = [ "<>", "<>", "<>" ]; my ( $name, $unmixedPhone, $desc ); # Create the entry fields. my $nameEntry = new Cdk::Entry( 'Label' => "Name", 'Ypos' => 8, 'Width' => 20, 'Min' => 2, 'Max' => 256, 'Filler' => "_" ); my $phoneTemp = new Cdk::Template( 'Label' => "Number", 'Plate' => "(###) ###-####", 'Overlay' => "(___) ___-____", 'Ypos' => 11 ); my $descEntry = new Cdk::Entry( 'Label' => "Description", 'Ypos' => 14, 'Width' => 20, 'Min' => 2, 'Max' => 256, 'Filler' => "_" ); # Start the loop. for ( ; ; ) { # Draw the objects. $nameEntry->draw(); $phoneTemp->draw(); $descEntry->draw(); # Get the information. $name = $nameEntry->activate(); $unmixedPhone = $phoneTemp->activate(); $desc = $descEntry->activate(); # Make sure they want to add this number. my $answer = popupDialog( $mesg, $buttons ); last if $answer == 0; return if $answer == 1; } # Assemble the information and create the object. my $phone = $phoneTemp->mix(); my $temp = "$name$type$phone----$desc"; my $object = new PhoneData($temp); return $object; } # # This gets a large phone record. # sub getLargePhoneRecord { my $type = shift; my $mesg = [ "Confirm New Phone Entry", "Do you want to add this phone number?" ]; my $buttons = [ "<>", "<>", "<>" ]; my ( $name, $address, $city, $prov, $postal, $unmixedPhone, $desc ); # Create the widgets. my $nameEntry = new Cdk::Entry( 'Label' => "Name", 'Ypos' => 5, 'Xpos' => "LEFT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 20 ); my $addressEntry = new Cdk::Entry( 'Label' => "Address", 'Ypos' => 5, 'Xpos' => "RIGHT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 40 ); my $cityEntry = new Cdk::Entry( 'Label' => "City", 'Ypos' => 8, 'Xpos' => "LEFT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 20 ); my $provEntry = new Cdk::Entry( 'Label' => "Province", 'Ypos' => 8, 'Xpos' => 29, 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 15 ); my $postalEntry = new Cdk::Entry( 'Label' => "Postal Code", 'Ypos' => 8, 'Xpos' => "RIGHT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 10, 'Dtype' => "UMIXED" ); my $phoneTemp = new Cdk::Template( 'Label' => "Number", 'Ypos' => 11, 'Xpos' => "LEFT", 'Overlay' => "(___) ___-____", 'Plate' => "(###) ###-####" ); my $descEntry = new Cdk::Entry( 'Label' => "Description", 'Ypos' => 11, 'Xpos' => "RIGHT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 20 ); # Start the loop. for ( ; ; ) { # Draw the screen. $nameEntry->draw(); $addressEntry->draw(); $cityEntry->draw(); $provEntry->draw(); $postalEntry->draw(); $phoneTemp->draw(); $descEntry->draw(); # Get the information. $name = $nameEntry->activate(); $address = $addressEntry->activate(); $city = $cityEntry->activate(); $prov = $provEntry->activate(); $postal = $postalEntry->activate(); $unmixedPhone = $phoneTemp->activate(); $desc = $descEntry->activate(); # Make sure they want to add this number. my $answer = popupDialog( $mesg, $buttons ); last if $answer == 0; return if $answer == 1; } # Assemble the information and create the object. my $phone = $phoneTemp->mix(); my $temp = "$name$type$phone$address$city$prov$postal$desc"; my $object = new PhoneData($temp); return $object; } # # This inserts an entry into the phone scrolling list. # sub insertPhoneEntryCB { my ( $scroll, $data, $list ) = @_; my ( $size, $currentItem ) = $scroll->info(); my $itemName = $list->[$currentItem]; # Erase the scrolling list. $scroll->erase(); # Get a new phone record. my $newRecord = getNewPhoneRecord(); # Make sure there is a record to add. if ( !defined $newRecord ) { $scroll->draw(); return 1; } # Push the information onto the record array. push( @$data, $newRecord ); # Push the information onto the list array. my $name = $newRecord->{'Name'}; my $namedTyped = $GLineType[ $newRecord->{'Type'} ]; my $temp = "$name ($namedTyped)"; push( @$list, $temp ); # Add it to the scrolling list. $scroll->add( 'Item' => $temp ); $scroll->draw(); return 1; } # # This deletes an entry from a scrolling list. # sub deletePhoneEntryCB { my ( $scroll, $data, $list ) = @_; my ( $size, $currentItem ) = $scroll->info(); my $itemName = $list->[$currentItem]; my $buttons = [ "<>", "<>" ]; my $mesg = [ "Do you really want to delete the phone entry", "$itemName" ]; my @array = @$data; # Ask the user if they really want to delete this item. if ( popupDialog( $mesg, $buttons ) == 1 ) { # Nuke it. $scroll->delete( 'Position' => $currentItem ); # Remove it from the arrays. for ( my $x = $currentItem ; $x < $#array ; $x++ ) { $data->[$x] = $data->[ $x + 1 ]; $list->[$x] = $list->[ $x + 1 ]; } pop(@$data); pop(@$list); } $scroll->erase(); $scroll->draw(); return 1; } # # This prints out certain rolodex groups. # sub printRolodexGroups { my (%groupInfo) = @_; my $options = [ "Print to Printer ", "Print to File ", "Don't Print " ]; my $title = "Select Which Groups To Print"; my @list = (); my ( $height, $filename ); # Create the group list to print. foreach my $key ( sort keys %groupInfo ) { push( @list, $key ); } # Determine the height of the selection box. $height = ( $#list > 5 ? 8 : $#list + 4 ); # Create the selection list. my $select = new Cdk::Selection( 'Title' => $title, 'Height' => $height, 'Width' => 40, 'List' => \@list, 'Choices' => $options ); # Get the selections to print. my @answer = $select->activate(); undef $select; # check if the user canceled. if ( !defined @answer ) { my $mesg = ["Print Canceled"]; popupLabel($mesg); return; } # Start printing the groups. for ( my $x = 0 ; $x <= $#answer ; $x++ ) { my $groupName = $list[$x]; if ( $answer[$x] == 0 ) { # Create a label for a title. my $mesg = ["Printing Group [$groupName] to Printer"]; my $title = new Cdk::Label( 'Message' => $mesg, 'Box' => "FALSE", 'Xpos' => "TOP" ); $title->draw( 'Box' => "FALSE" ); # Print to Printer. my $printEntry = new Cdk::Entry( 'Label' => "Printer Name", 'Filler' => "_", 'Width' => 20, 'Min' => 2, 'Max' => 256 ); # Set the default value as the PRINTER ENV variable. if ( defined $ENV{'PRINTER'} ) { $printEntry->set( 'Value' => "$ENV{'PRINTER'}", 'Min' => 2, 'Max' => 256 ); } my $printer = $printEntry->activate(); printGroup( $groupName, %groupInfo, "/tmp/rolodex.$$" ); system("lpr /tmp/rolodex.$$"); unlink "/tmp/rolodex.$$"; } elsif ( $answer[$x] == 1 ) { # Create a label for a title. my $mesg = ["Printing Group [$groupName] to File"]; my $title = new Cdk::Label( 'Message' => $mesg, 'Box' => "FALSE", 'Xpos' => "TOP" ); $title->draw( 'Box' => "FALSE" ); # Print to file. my $fileEntry = new Cdk::Entry( 'Label' => "Filename", 'Filler' => "_", 'Width' => 20, 'Min' => 2, 'Max' => 256 ); # Make sure that a filename is given. while ( !defined $filename ) { $filename = $fileEntry->activate(); if ( !defined $filename ) { popupLabel( ["Please supply a filename."] ); } } # Print the group to a file. printGroup( $groupName, %groupInfo, $filename ); } } } our $fullName; our $number; our $address; our $city; our $province; our $postalCode; our $description; # # This opens a phone database file and prints it to the given filename. # sub printGroup { my ( $name, %groupInfo, $filename ) = @_; # Try to open the file. if ( !open( PHONE, ">$filename" ) ) { my $mesg = [ "Error", "Could not print the group $name to $filename.", "$!", "Press any key to continue." ]; popupLabel($mesg); return; } # Open the phone database file and read in the contents. my ( $desc, $dbm ) = split( //, $groupInfo{$name} ); my @rolodexData = readPhoneDataFile($dbm); select(PHONE); $| = 1; # Set variables for the report. foreach my $object (@rolodexData) { $fullName = $object->{'Name'}; $number = $object->{'Number'}; $address = $object->{'Address'}; $city = $object->{'City'}; $province = $object->{'Province'}; $postalCode = $object->{'Postal Code'}; $description = $object->{'Description'}; write; } close(PHONE); } ######################################### format PHONE= Name @<<<<<<<<<<<<<<<<<<<<<<<<<< Phone Number @<<<<<<<<<<<<<<<<<<<<<<<<<<< $fullName, $number Address @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< City @<<<<<<<<<<<<<<<<<<<<<<<<<<< $address, $city City @<<<<<<<<<<<<< Province @<<<<<<<<<<<<<<<<<< Postal Code @<<<<<<<<<<<<<<< $city, $province, $postalCode Description @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $description ----------------------------------------------------------------------------- . ######################################### package PhoneData; # # This creates a new object. # sub new { my $junk = shift; my $record = shift; my $self = {}; # Split the record apart. my ( $name, $type, $phone, $address, $city, $prov, $postal, $desc ) = split( //, $record ); # Store the info in the object. $self->{'Name'} = $name; $self->{'Type'} = $type; $self->{'Number'} = $phone; $self->{'Address'} = $address; $self->{'City'} = $city; $self->{'Province'} = $prov; $self->{'Postal Code'} = $postal; $self->{'Description'} = $desc; return bless $self; } # # This prints out the contents of an object. # sub display { my $self = shift; my %object = %$self; my @mesg = (); foreach my $key ( sort keys %object ) { push( @mesg, sprintf( "Key = %-10s Value = %-30s", $key, $object{$key} ) ); } main::popupLabel( \@mesg ); } sub print { my $object = shift; my %info = $object; foreach my $key ( sort keys %info ) { print "Key = $key Value = $info{$key}\n"; } } cdk-perl-20150928/Makefile.PL.in0000644000175100001440000000112212170564732014570 0ustar tomusers# # $Author: tom $ # $Date: 2013/07/14 18:11:38 $ # $Revision: 1.5 $ # use ExtUtils::MakeMaker; # # See README and Perl's MakeMaker.pm for guidance in modifying the # LIBS and INC strings. # WriteMakefile( 'NAME' => 'Cdk', 'PREFIX' => '@prefix@', 'VERSION' => '@VERSION@', 'EXE_EXT' => '@EXEEXT@', 'OBJ_EXT' => '.@OBJEXT@', 'LIB_EXT' => '@DFT_LIB_SUFFIX@', 'CC' => '@CC@ @EXTRA_CFLAGS@', 'FULL_AR' => '@FULL_AR@', 'LD' => '@CC@', 'INC' => '@CPPFLAGS@', 'LIBS' => ['@LIBS@'], 'RANLIB' => '@RANLIB@', 'clean' => {FILES => 'Makefile.old'}, ); cdk-perl-20150928/CHANGES0000644000175100001440000000636112602361320013202 0ustar tomusers-- $Id: CHANGES,v 1.21 2015/09/29 01:01:04 tom Exp $ -------------------------------------------------------------------------------- Cdk Perl change-list Modifications copyright Thomas E. Dickey 2001-2014,2015 -------------------------------------------------------------------------------- 2015/09/28 + updated configure script 2014/11/06 + build-fixes for dpkg/rpm/ports test-packages 2013/08/16 + build-fix for perl 5.18 (patch by Niko Tyni, Debian #719578) 2013/07/17 + adapt files from FreeBSD port for test-builds. + add fix for demos/rolodex from FreeBSD port. + fix handling of Calendar's return value for activate and getDate methods. 2013/07/14 + indent demos/examples using perltidy. + reviewed demos/examples, made minor fixes, including using "strict". + remove unused flush.pl from ButtonBox.pm and Dialog.pm; this is no longer available with Fedora. + adapt RPM spec-file from pld.org for test-builds. + fix build with Perl 5.18 (patch by Niko Tyni, Debian #708593). + modify configure script to add $(BUILDDIR) variable to makefile, to help with test-builds which do not rely on chroot, etc. + use 'key' parameter in _Cdk::Calendar_Inject() + use attrib parameter in DrawMesg() + fix compiler warnings + add configure options to enable compiler warnings 2012/03/24 + fix boxes in help-messages, which had top/bottom segments too short. + modified Debian package scripts to copy "examples" directory under package's "examples" directory since the fulldemo scripts expect this layout. + modified Debian package scripts to make exclusion from compressing examples work for Debian 5.0 + make default path for help system "dynamic" (report/patch from Debian #519820) + add Debian package script, for testing 2006/01/03 + completed demos/bday + correct a typo in Cdk::Viewer (report/patch from Debian #312733). 2003/12/10 + eliminate most of fixed array limits. + correct logic of sv2int(), etc., broken by 2002/07/28 changes. + alter matrix interface to use setCDKMatrixCells() rather than setCDKMatrix(), since the latter dumps core due to an addressing limitation - an 8Mb struct might be too large. + update to match struct-member changes in current CDK snapshot's CDKSWINDOW struct. + replace complex macros except MAKE_CHAR_MATRIX with functions, fix several illegal memory references reported by valgrind. 2002/07/28 + change version number to correspond with Exporter.pm documentation. + add a MANIFEST, drop 'FILES' since it is redundant. + drop BUGS and NOTES since they are obsolete. + add Cdk::getVersion() method. + add a null-pointer check in sv2chtype(), needed for return-value from char2Chtype(). Also changed this function to have a single return point. + add fixpaths script, to allow examples and demos to be run easily. Just run fixpaths, and it will adjust the path to 'perl' in the first line of each example-script. 2001/04/21 + correct include-path for cdk.h (reports by Pawel Gajda and Ron Poulton ) + correct missing Box parameter of drawCDKMenu (Pawel Gajda). 2001/01/07 + modify to work with perl 5.6.0 + fix several places where functions did not return value. + modify some scripts to show nonblank character, e.g., for slider. cdk-perl-20150928/aclocal.m40000644000175100001440000010052112602361436014050 0ustar tomusersdnl $Id: aclocal.m4,v 1.5 2015/09/29 01:02:22 tom Exp $ dnl macros used for CDK-Perl configure script dnl --------------------------------------------------------------------------- dnl Copyright 2013,2015 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, distribute dnl with modifications, sublicense, and/or sell copies of the Software, and to dnl permit persons to whom the Software is furnished to do so, subject to the dnl following conditions: dnl dnl The above copyright notice and this permission notice shall be included in dnl all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name(s) of the above copyright dnl holders shall not be used in advertising or otherwise to promote the sale, dnl use or other dealings in this Software without prior written authorization. dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- dnl CF_ACVERSION_CHECK version: 5 updated: 2014/06/04 19:11:49 dnl ------------------ dnl Conditionally generate script according to whether we're using a given autoconf. dnl dnl $1 = version to compare against dnl $2 = code to use if AC_ACVERSION is at least as high as $1. dnl $3 = code to use if AC_ACVERSION is older than $1. define([CF_ACVERSION_CHECK], [ ifdef([AC_ACVERSION], ,[ifdef([AC_AUTOCONF_VERSION],[m4_copy([AC_AUTOCONF_VERSION],[AC_ACVERSION])],[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])])dnl ifdef([m4_version_compare], [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], [CF_ACVERSION_COMPARE( AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl dnl --------------------------------------------------------------------------- dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53 dnl -------------------- dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, dnl MAJOR2, MINOR2, TERNARY2, dnl PRINTABLE2, not FOUND, FOUND) define([CF_ACVERSION_COMPARE], [ifelse(builtin([eval], [$2 < $5]), 1, [ifelse([$8], , ,[$8])], [ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_CFLAGS version: 12 updated: 2015/04/12 15:39:00 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. dnl dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS, dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily dnl confused by the quotes (which require backslashes to keep them usable). AC_DEFUN([CF_ADD_CFLAGS], [ cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $1 do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags) ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi AC_SUBST(EXTRA_CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_CC_ENV_FLAGS version: 2 updated: 2015/04/12 15:39:00 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler with dnl options, but eliminates a more common category of user confusion. AC_DEFUN([CF_CC_ENV_FLAGS], [ # This should have been defined by AC_PROG_CC : ${CC:=cc} AC_MSG_CHECKING(\$CC variable) case "$CC" in (*[[\ \ ]]-[[IUD]]*) AC_MSG_RESULT(broken) AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'` CC=`echo "$CC" | sed -e 's/[[ ]].*//'` CF_ADD_CFLAGS($cf_flags) ;; (*) AC_MSG_RESULT(ok) ;; esac ])dnl dnl --------------------------------------------------------------------------- dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03 dnl -------------- dnl Check if we're accidentally using a cache from a different machine. dnl Derive the system name, as a check for reusing the autoconf cache. dnl dnl If we've packaged config.guess and config.sub, run that (since it does a dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM dnl which is useful in cross-compiles. dnl dnl Note: we would use $ac_config_sub, but that is one of the places where dnl autoconf 2.5x broke compatibility with autoconf 2.13 AC_DEFUN([CF_CHECK_CACHE], [ if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then ifelse([$1],,[AC_CANONICAL_HOST],[$1]) system_name="$host_os" else system_name="`(uname -s -r) 2>/dev/null`" if test -z "$system_name" ; then system_name="`(hostname) 2>/dev/null`" fi fi test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.]) AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) test -z "$system_name" && system_name="$cf_cv_system_name" test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name) if test ".$system_name" != ".$cf_cv_system_name" ; then AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) AC_MSG_ERROR("Please remove config.cache and try again.") fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_CLANG_COMPILER version: 2 updated: 2013/11/19 19:23:35 dnl ----------------- dnl Check if the given compiler is really clang. clang's C driver defines dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does dnl not ignore some gcc options. dnl dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from dnl the wrappers for gcc and g++ warnings. dnl dnl $1 = GCC (default) or GXX dnl $2 = CLANG_COMPILER (default) dnl $3 = CFLAGS (default) or CXXFLAGS AC_DEFUN([CF_CLANG_COMPILER],[ ifelse([$2],,CLANG_COMPILER,[$2])=no if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler) cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments" AC_TRY_COMPILE([],[ #ifdef __clang__ #else make an error #endif ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" ],[]) ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2])) fi ]) dnl --------------------------------------------------------------------------- dnl CF_DISABLE_LEAKS version: 7 updated: 2012/10/02 20:55:03 dnl ---------------- dnl Combine no-leak checks with the libraries or tools that are used for the dnl checks. AC_DEFUN([CF_DISABLE_LEAKS],[ AC_REQUIRE([CF_WITH_DMALLOC]) AC_REQUIRE([CF_WITH_DBMALLOC]) AC_REQUIRE([CF_WITH_VALGRIND]) AC_MSG_CHECKING(if you want to perform memory-leak testing) AC_ARG_ENABLE(leaks, [ --disable-leaks test: free permanent memory, analyze leaks], [if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi], : ${with_no_leaks:=no}) AC_MSG_RESULT($with_no_leaks) if test "$with_no_leaks" = yes ; then AC_DEFINE(NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.]) AC_DEFINE(YY_NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary dnl to documentation, unrecognized directives cause older compilers to barf. AC_DEFUN([CF_GCC_ATTRIBUTES], [ if test "$GCC" = yes then cat > conftest.i < conftest.$ac_ext <&AC_FD_CC case $cf_attribute in (printf) cf_printf_attribute=yes cat >conftest.h <conftest.h <conftest.h <>confdefs.h case $cf_attribute in (noreturn) AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc]) ;; (printf) cf_value='/* nothing */' if test "$cf_printf_attribute" != no ; then cf_value='__attribute__((format(printf,fmt,var)))' AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.]) fi AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc]) ;; (scanf) cf_value='/* nothing */' if test "$cf_scanf_attribute" != no ; then cf_value='__attribute__((format(scanf,fmt,var)))' AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.]) fi AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc]) ;; (unused) AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc]) ;; esac fi done else fgrep define conftest.i >>confdefs.h fi rm -rf conftest* fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_GCC_VERSION version: 7 updated: 2012/10/18 06:46:33 dnl -------------- dnl Find version of gcc AC_DEFUN([CF_GCC_VERSION],[ AC_REQUIRE([AC_PROG_CC]) GCC_VERSION=none if test "$GCC" = yes ; then AC_MSG_CHECKING(version of $CC) GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown AC_MSG_RESULT($GCC_VERSION) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_GCC_WARNINGS version: 32 updated: 2015/04/12 15:39:00 dnl --------------- dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: dnl dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x) dnl -Wredundant-decls (system headers make this too noisy) dnl -Wtraditional (combines too many unrelated messages, only a few useful) dnl -Wwrite-strings (too noisy, but should review occasionally). This dnl is enabled for ncurses using "--enable-const". dnl -pedantic dnl dnl Parameter: dnl $1 is an optional list of gcc warning flags that a particular dnl application might want to use, e.g., "no-unused" for dnl -Wno-unused dnl Special: dnl If $with_ext_const is "yes", add a check for -Wwrite-strings dnl AC_DEFUN([CF_GCC_WARNINGS], [ AC_REQUIRE([CF_GCC_VERSION]) CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS) CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS) cat > conftest.$ac_ext <],[ #ifndef _XOPEN_SOURCE make an error #endif], [cf_cv_gnu_source=no], [cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" AC_TRY_COMPILE([#include ],[ #ifdef _XOPEN_SOURCE make an error #endif], [cf_cv_gnu_source=no], [cf_cv_gnu_source=yes]) CPPFLAGS="$cf_save" ]) ]) test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ])dnl dnl --------------------------------------------------------------------------- dnl CF_INTEL_COMPILER version: 7 updated: 2015/04/12 15:39:00 dnl ----------------- dnl Check if the given compiler is really the Intel compiler for Linux. It dnl tries to imitate gcc, but does not return an error when it finds a mismatch dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK. dnl dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from dnl the wrappers for gcc and g++ warnings. dnl dnl $1 = GCC (default) or GXX dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS dnl $3 = CFLAGS (default) or CXXFLAGS AC_DEFUN([CF_INTEL_COMPILER],[ AC_REQUIRE([AC_CANONICAL_HOST]) ifelse([$2],,INTEL_COMPILER,[$2])=no if test "$ifelse([$1],,[$1],GCC)" = yes ; then case $host_os in (linux*|gnu*) AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler) cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc" AC_TRY_COMPILE([],[ #ifdef __INTEL_COMPILER #else make an error #endif ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" ],[]) ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2])) ;; esac fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_LIB_SUFFIX version: 25 updated: 2015/04/17 21:13:04 dnl ------------- dnl Compute the library file-suffix from the given model name dnl $1 = model name dnl $2 = variable to set (the nominal library suffix) dnl $3 = dependency variable to set (actual filename) dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. AC_DEFUN([CF_LIB_SUFFIX], [ case X$1 in (Xlibtool) $2='.la' $3=[$]$2 ;; (Xdebug) $2='_g.a' $3=[$]$2 ;; (Xprofile) $2='_p.a' $3=[$]$2 ;; (Xshared) case $cf_cv_system_name in (aix[[5-7]]*) $2='.so' $3=[$]$2 ;; (cygwin*|msys*|mingw*) $2='.dll' $3='.dll.a' ;; (darwin*) $2='.dylib' $3=[$]$2 ;; (hpux*) case $target in (ia64*) $2='.so' $3=[$]$2 ;; (*) $2='.sl' $3=[$]$2 ;; esac ;; (*) $2='.so' $3=[$]$2 ;; esac ;; (*) $2='.a' $3=[$]$2 ;; esac if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}" then $2="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$2}" $3="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$3}" fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32 dnl ---------- dnl Write a debug message to config.log, along with the line number in the dnl configure script. AC_DEFUN([CF_MSG_LOG],[ echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- dnl CF_NO_LEAKS_OPTION version: 6 updated: 2015/04/12 15:39:00 dnl ------------------ dnl see CF_WITH_NO_LEAKS AC_DEFUN([CF_NO_LEAKS_OPTION],[ AC_MSG_CHECKING(if you want to use $1 for testing) AC_ARG_WITH($1, [$2], [AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[ $4 ]) : ${with_cflags:=-g} : ${with_no_leaks:=yes} with_$1=yes], [with_$1=]) AC_MSG_RESULT(${with_$1:-no}) case .$with_cflags in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) CF_ADD_CFLAGS([-g]) ;; esac ;; esac ])dnl dnl --------------------------------------------------------------------------- dnl CF_POSIX_C_SOURCE version: 9 updated: 2015/04/12 15:39:00 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl dnl POSIX.1-1990 _POSIX_SOURCE dnl POSIX.1-1990 and _POSIX_SOURCE and dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2 dnl Bindings Option dnl POSIX.1b-1993 _POSIX_C_SOURCE=199309L dnl POSIX.1c-1996 _POSIX_C_SOURCE=199506L dnl X/Open 2000 _POSIX_C_SOURCE=200112L dnl dnl Parameters: dnl $1 is the nominal value for _POSIX_C_SOURCE AC_DEFUN([CF_POSIX_C_SOURCE], [ cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1]) cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" CF_REMOVE_DEFINE(cf_trim_CFLAGS,$cf_save_CFLAGS,_POSIX_C_SOURCE) CF_REMOVE_DEFINE(cf_trim_CPPFLAGS,$cf_save_CPPFLAGS,_POSIX_C_SOURCE) AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[ CF_MSG_LOG(if the symbol is already defined go no further) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE make an error #endif], [cf_cv_posix_c_source=no], [cf_want_posix_source=no case .$cf_POSIX_C_SOURCE in (.[[12]]??*) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" ;; (.2) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_want_posix_source=yes ;; (.*) cf_want_posix_source=yes ;; esac if test "$cf_want_posix_source" = yes ; then AC_TRY_COMPILE([#include ],[ #ifdef _POSIX_SOURCE make an error #endif],[], cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE") fi CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE) CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" CF_MSG_LOG(if the second compile does not leave our definition intact error) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE make an error #endif],, [cf_cv_posix_c_source=no]) CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" ]) ]) if test "$cf_cv_posix_c_source" != no ; then CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" CF_ADD_CFLAGS($cf_cv_posix_c_source) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_AR version: 1 updated: 2009/01/01 20:15:22 dnl ---------- dnl Check for archiver "ar". AC_DEFUN([CF_PROG_AR],[ AC_CHECK_TOOL(AR, ar, ar) ]) dnl --------------------------------------------------------------------------- dnl CF_PROG_CC version: 4 updated: 2014/07/12 18:57:58 dnl ---------- dnl standard check for CC, plus followup sanity checks dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name AC_DEFUN([CF_PROG_CC],[ ifelse($1,,[AC_PROG_CC],[AC_PROG_CC($1)]) CF_GCC_VERSION CF_ACVERSION_CHECK(2.52, [AC_PROG_CC_STDC], [CF_ANSI_CC_REQD]) CF_CC_ENV_FLAGS ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_EXT version: 13 updated: 2015/04/18 09:03:58 dnl ----------- dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX. AC_DEFUN([CF_PROG_EXT], [ AC_REQUIRE([CF_CHECK_CACHE]) case $cf_cv_system_name in (os2*) CFLAGS="$CFLAGS -Zmt" CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__" CXXFLAGS="$CXXFLAGS -Zmt" # autoconf's macro sets -Zexe and suffix both, which conflict:w LDFLAGS="$LDFLAGS -Zmt -Zcrtdll" ac_cv_exeext=.exe ;; esac AC_EXEEXT AC_OBJEXT PROG_EXT="$EXEEXT" AC_SUBST(PROG_EXT) test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT",[Define to the program extension (normally blank)]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list dnl of C compiler options. This works around the problem that not all dnl compilers process -U and -D options from left-to-right, so a -U option dnl cannot be used to cancel the effect of a preceding -D option. dnl dnl $1 = target (which could be the same as the source variable) dnl $2 = source (including '$') dnl $3 = symbol to remove define([CF_REMOVE_DEFINE], [ $1=`echo "$2" | \ sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \ -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'` ])dnl dnl --------------------------------------------------------------------------- dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50 dnl ------------------- dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we dnl can define it successfully. AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ AC_TRY_COMPILE([ #include #include #include ],[ #ifndef _XOPEN_SOURCE make an error #endif], [cf_cv_xopen_source=no], [cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" AC_TRY_COMPILE([ #include #include #include ],[ #ifdef _XOPEN_SOURCE make an error #endif], [cf_cv_xopen_source=no], [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) CPPFLAGS="$cf_save" ]) ]) if test "$cf_cv_xopen_source" != no ; then CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" CF_ADD_CFLAGS($cf_temp_xopen_source) fi ]) dnl --------------------------------------------------------------------------- dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59 dnl -------- dnl Make an uppercase version of a variable dnl $1=uppercase($2) AC_DEFUN([CF_UPPER], [ $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 dnl ---------- dnl Use AC_VERBOSE w/o the warnings AC_DEFUN([CF_VERBOSE], [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG CF_MSG_LOG([$1]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47 dnl ---------------- dnl Configure-option for dbmalloc. The optional parameter is used to override dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests. AC_DEFUN([CF_WITH_DBMALLOC],[ CF_NO_LEAKS_OPTION(dbmalloc, [ --with-dbmalloc test: use Conor Cahill's dbmalloc library], [USE_DBMALLOC]) if test "$with_dbmalloc" = yes ; then AC_CHECK_HEADER(dbmalloc.h, [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse([$1],,[],[,$1]))]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_DMALLOC version: 7 updated: 2010/06/21 17:26:47 dnl --------------- dnl Configure-option for dmalloc. The optional parameter is used to override dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests. AC_DEFUN([CF_WITH_DMALLOC],[ CF_NO_LEAKS_OPTION(dmalloc, [ --with-dmalloc test: use Gray Watson's dmalloc library], [USE_DMALLOC]) if test "$with_dmalloc" = yes ; then AC_CHECK_HEADER(dmalloc.h, [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 dnl ---------------- AC_DEFUN([CF_WITH_VALGRIND],[ CF_NO_LEAKS_OPTION(valgrind, [ --with-valgrind test: use valgrind], [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_WARNINGS version: 5 updated: 2004/07/23 14:40:34 dnl ---------------- dnl Combine the checks for gcc features into a configure-script option dnl dnl Parameters: dnl $1 - see CF_GCC_WARNINGS AC_DEFUN([CF_WITH_WARNINGS], [ if ( test "$GCC" = yes || test "$GXX" = yes ) then AC_MSG_CHECKING(if you want to check for gcc warnings) AC_ARG_WITH(warnings, [ --with-warnings test: turn on gcc warnings], [cf_opt_with_warnings=$withval], [cf_opt_with_warnings=no]) AC_MSG_RESULT($cf_opt_with_warnings) if test "$cf_opt_with_warnings" != no ; then CF_GCC_ATTRIBUTES CF_GCC_WARNINGS([$1]) fi fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, dnl without losing the common non-POSIX features. dnl dnl Parameters: dnl $1 is the nominal value for _XOPEN_SOURCE dnl $2 is the nominal value for _POSIX_C_SOURCE AC_DEFUN([CF_XOPEN_SOURCE],[ AC_REQUIRE([AC_CANONICAL_HOST]) cf_XOPEN_SOURCE=ifelse([$1],,500,[$1]) cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) cf_xopen_source= case $host_os in (aix[[4-7]]*) cf_xopen_source="-D_ALL_SOURCE" ;; (cygwin|msys) cf_XOPEN_SOURCE=600 ;; (darwin[[0-8]].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; (darwin*) cf_xopen_source="-D_DARWIN_C_SOURCE" cf_XOPEN_SOURCE= ;; (freebsd*|dragonfly*) # 5.x headers associate # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L cf_POSIX_C_SOURCE=200112L cf_XOPEN_SOURCE=600 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" ;; (hpux11*) cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500" ;; (hpux*) cf_xopen_source="-D_HPUX_SOURCE" ;; (irix[[56]].*) cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; (linux*|gnu*|mint*|k*bsd*-gnu) CF_GNU_SOURCE ;; (minix*) cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... ;; (mirbsd*) # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; (netbsd*) cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; (openbsd[[4-9]]*) # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=600 ;; (openbsd*) # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;; (osf[[45]]*) cf_xopen_source="-D_OSF_SOURCE" ;; (nto-qnx*) cf_xopen_source="-D_QNX_SOURCE" ;; (sco*) # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; (solaris2.*) cf_xopen_source="-D__EXTENSIONS__" cf_cv_xopen_source=broken ;; (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2) cf_XOPEN_SOURCE= cf_POSIX_C_SOURCE= ;; (*) CF_TRY_XOPEN_SOURCE CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; esac if test -n "$cf_xopen_source" ; then CF_ADD_CFLAGS($cf_xopen_source,true) fi dnl In anything but the default case, we may have system-specific setting dnl which is still not guaranteed to provide all of the entrypoints that dnl _XOPEN_SOURCE would yield. if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) AC_TRY_COMPILE([#include ],[ #ifndef _XOPEN_SOURCE make an error #endif], [cf_XOPEN_SOURCE_set=yes], [cf_XOPEN_SOURCE_set=no]) AC_MSG_RESULT($cf_XOPEN_SOURCE_set) if test $cf_XOPEN_SOURCE_set = yes then AC_TRY_COMPILE([#include ],[ #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE make an error #endif], [cf_XOPEN_SOURCE_set_ok=yes], [cf_XOPEN_SOURCE_set_ok=no]) if test $cf_XOPEN_SOURCE_set_ok = no then AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) fi else CF_TRY_XOPEN_SOURCE fi fi ]) cdk-perl-20150928/install-sh0000755000175100001440000001572307762207755014243 0ustar tomusers#! /bin/sh # # install - install a program, script, or datafile # # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do pathcomp=$pathcomp$1 shift if [ ! -d "$pathcomp" ] ; then $mkdirprog "$pathcomp" else : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename "$dst"` else : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/#inst.$$# rmtmp=$dstdir/#rm.$$# # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now remove or move aside any old file at destination location. We try this # two ways since rm can't unlink itself on some systems and the destination # file might be busy for other reasons. In this case, the final cleanup # might fail but the new file should still install successfully. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } cdk-perl-20150928/README0000644000175100001440000000232512602361704013071 0ustar tomusers-- $Id: README,v 1.7 2015/09/29 01:05:08 tom Exp $ Cdk Perl5 Extension, Mike Glover, Copyright 1995-1999 Thomas Dickey modifications copyright 1999-2014,2015 ------------------------------------------------------------------------------ This is the Perl5 extension to the Cdk library written by Mike Glover. See MANIFEST for a list of files provided with this extension. See COPYING for the licensing terms for this package. See http://invisible-island.net/cdk/ ftp://invisible-island.net/cdk/ for the current version of this package. How to build/install: --------------------- 1. Make sure that Cdk (the C library libcdk and its header files) are installed. For example /usr/local/include/cdk/cdk.h (and other files) /usr/local/lib/libcdk.a (and perhaps a shared-library) 2. Run the configure script; it should find the Cdk library and header files. 3. Run these commands make make install Testing the Cdk extension: -------------------------- There are several examples in the subdirectories of this package: demo contains a few simple application programs. examples contains scripts which demonstrate each widget separately. fulldemo combines all of the widgets into a menu-driven application. cdk-perl-20150928/configure.in0000644000175100001440000001047112170567377014541 0ustar tomusersdnl Process this file with autoconf to produce a configure script. dnl --------------------------------------------------------------------------- dnl Copyright 2012,2013 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, distribute dnl with modifications, sublicense, and/or sell copies of the Software, and to dnl permit persons to whom the Software is furnished to do so, subject to the dnl following conditions: dnl dnl The above copyright notice and this permission notice shall be included in dnl all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name(s) of the above copyright dnl holders shall not be used in advertising or otherwise to promote the sale, dnl use or other dealings in this Software without prior written authorization. dnl --------------------------------------------------------------------------- AC_REVISION($Revision: 1.15 $) AC_PREREQ(2.13.20030927) rm -f config.cache dnl $Id: configure.in,v 1.15 2013/07/14 18:33:35 tom Exp $ AC_INIT(Cdk.xs) AC_PREFIX_DEFAULT(/usr) AC_MSG_CHECKING(for version used by Cdk.pm) VERSION=`egrep '[[$]]VERSION[[ ]][[ ]]*=' $srcdir/Cdk.pm | sed -e 's/^[[^"]]*"//' -e 's/".*//'` AC_MSG_RESULT($VERSION) AC_SUBST(VERSION) CF_PROG_CC CF_PROG_AR AC_CHECK_TOOL(LD,ld,'$(CC)') AC_PATH_TOOL(FULL_AR,ar,'$(AR)') AC_PROG_RANLIB CF_PROG_EXT CF_LIB_SUFFIX($LIB_MODEL, DFT_LIB_SUFFIX, DFT_DEP_SUFFIX) AC_SUBST(DFT_LIB_SUFFIX) CF_XOPEN_SOURCE CF_WITH_WARNINGS CF_DISABLE_LEAKS AC_CHECK_PROGS(PERL,[perl perl5],none) if test "$PERL" = none then AC_MSG_ERROR(no perl found) fi AC_MSG_CHECKING(if you want to use cdk5-config for C flags) AC_ARG_WITH(cdk, [ --with-cdk use cdk5-config for C flags], [with_cdk="cdk5-config"], [with_cdk=no]) AC_MSG_RESULT($with_cdk) AC_MSG_CHECKING(if you want to use cdkw5-config for C flags) AC_ARG_WITH(cdkw, [ --with-cdkw use cdkw5-config for C flags], [with_cdk="cdkw5-config"], [with_cdk=no]) AC_MSG_RESULT($with_cdk) if test $with_cdk = no then AC_CHECK_HEADER(cdk.h,,[ cf_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/usr/include/cdk" AC_CHECK_HEADER(cdk/cdk.h,[ AC_DEFINE(HAVE_CDK_CDK_H) ],[ AC_MSG_ERROR(cannot find cdk header file) ]) ]) AC_CHECK_LIB(cdk,initCDKScreen,[LIBS="-lcdk $LIBS"],[ AC_CHECK_LIB(cdkw,initCDKScreen,[LIBS="-lcdkw $LIBS"],[ AC_MSG_ERROR(cannot find cdk library)])]) elif $with_cdk --version 2>/dev/null >/dev/null then CFLAGS=`$with_cdk --cflags` LIBS=`$with_cdk --libs` else AC_MSG_ERROR(cannot use $cdk_config script) fi AC_SUBST(LIBS) AC_SUBST(CPPFLAGS) ### output makefile script AC_OUTPUT(Makefile.PL,[ # move confdefs.h aside while using perl, since it gets confused test -f "confdefs.h" && mv confdefs.h confdefs.hdr $PERL Makefile.PL test -f "confdefs.hdr" && mv confdefs.hdr confdefs.h # add to the distclean rule to cleanup files created by the configure script cat >>Makefile <Makefile.old echo "** updated Makefile to allow in-tree test-builds" diff Makefile Makefile.old mv Makefile.old Makefile fi ],[ PERL="$PERL" ]) cdk-perl-20150928/configure0000755000175100001440000046363412602361446014141 0ustar tomusers#! /bin/sh # From configure.in Revision: 1.15 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20150926. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Name of the executable. as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # NLS nuisances. $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} ac_unique_file="Cdk.xs" ac_default_prefix=/usr # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${datarootdir}/info' mandir='${datarootdir}/man' # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. build=$build_alias host=$host_alias target=$target_alias # FIXME: should be removed in autoconf 3.0. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat < if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. EOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue cd $ac_subdir # A "../" for each directory in /$ac_subdir. ac_dots=`echo $ac_subdir | sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` case $srcdir in .) # No --srcdir option. We are building in place. ac_sub_srcdir=$srcdir ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_sub_srcdir=$srcdir/$ac_subdir ;; *) # Relative path. ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; esac # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_sub_srcdir/configure.gnu; then echo $SHELL $ac_sub_srcdir/configure.gnu --help=recursive elif test -f $ac_sub_srcdir/configure; then echo $SHELL $ac_sub_srcdir/configure --help=recursive elif test -f $ac_sub_srcdir/configure.ac || test -f $ac_sub_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\EOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. EOF exit 0 fi exec 5>config.log cat >&5 </dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` PATH = $PATH _ASUNAME } >&5 cat >&5 <\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ac_sep=" " ;; *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" ac_sep=" " ;; esac # Get rid of the leading space. done # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. trap 'exit_status=$? # Save into config.log some information that might help in debugging. echo >&5 echo "## ----------------- ##" >&5 echo "## Cache variables. ##" >&5 echo "## ----------------- ##" >&5 echo >&5 # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } >&5 sed "/^$/d" confdefs.h >conftest.log if test -s conftest.log; then echo >&5 echo "## ------------ ##" >&5 echo "## confdefs.h. ##" >&5 echo "## ------------ ##" >&5 echo >&5 cat conftest.log >&5 fi (echo; echo) >&5 test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" >&5 echo "$as_me: exit $exit_status" >&5 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:850: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:861: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:869: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:885: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:889: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:895: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:897: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:899: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. It doesn't matter if # we pass some twice (in addition to the command line arguments). if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:918: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:920: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return=return case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh if { (echo "$as_me:941: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? echo "$as_me:944: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' else ac_path_separator=: fi PATH_SEPARATOR="$ac_path_separator" rm -f conftest.sh echo "$as_me:953: checking for version used by Cdk.pm" >&5 echo $ECHO_N "checking for version used by Cdk.pm... $ECHO_C" >&6 VERSION=`egrep '[$]VERSION[ ][ ]*=' $srcdir/Cdk.pm | sed -e 's/^[^"]*"//' -e 's/".*//'` echo "$as_me:956: result: $VERSION" >&5 echo "${ECHO_T}$VERSION" >&6 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return=return if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:968: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:983: found $ac_dir/$ac_word" >&5 break done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:991: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:994: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:1003: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:1018: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:1026: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:1029: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:1042: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:1057: found $ac_dir/$ac_word" >&5 break done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1065: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1068: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:1077: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" echo "$as_me:1092: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:1100: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:1103: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:1116: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:1136: found $ac_dir/$ac_word" >&5 break done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1158: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1161: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:1172: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:1187: found $ac_dir/$ac_word" >&5 break done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1195: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1198: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:1211: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:1226: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:1234: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:1237: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:1249: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:1254:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:1257: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:1260: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:1262: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:1265: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:1267: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:1270: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line 1274 "configure" #include "confdefs.h" int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:1290: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:1293: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:1296: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. for ac_file in `ls a.exe conftest.exe 2>/dev/null; ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 { { echo "$as_me:1319: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:1325: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:1330: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:1336: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1339: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:1346: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:1354: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:1361: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:1363: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:1366: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 if { (eval echo "$as_me:1368: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:1371: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:1387: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:1393: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:1399: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 1405 "configure" #include "confdefs.h" int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:1417: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1420: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 { { echo "$as_me:1432: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:1439: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:1443: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 1449 "configure" #include "confdefs.h" int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:1464: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1467: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:1470: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1473: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:1485: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:1491: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 1497 "configure" #include "confdefs.h" int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:1509: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1512: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:1515: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1518: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:1528: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:1555: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1558: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:1561: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1564: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line 1576 "configure" #include "confdefs.h" #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1592: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:1595: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1598: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line 1608 "configure" #include "confdefs.h" $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:1620: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1623: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:1626: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1629: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -rf conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return=return GCC_VERSION=none if test "$GCC" = yes ; then echo "$as_me:1659: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown echo "$as_me:1663: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi echo "$as_me:1667: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line 1675 "configure" #include "confdefs.h" #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:1724: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1727: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:1730: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1733: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:1750: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:1753: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # This should have been defined by AC_PROG_CC : ${CC:=cc} echo "$as_me:1761: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in (*[\ \ ]-[IUD]*) echo "$as_me:1765: result: broken" >&5 echo "${ECHO_T}broken" >&6 { echo "$as_me:1767: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'` CC=`echo "$CC" | sed -e 's/[ ].*//'` cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_flags do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi ;; (*) echo "$as_me:1853: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:1861: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:1876: found $ac_dir/$ac_word" >&5 break done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:1884: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:1887: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:1896: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_AR="ar" echo "$as_me:1911: found $ac_dir/$ac_word" >&5 break done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:1920: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:1923: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 echo "$as_me:1935: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LD="${ac_tool_prefix}ld" echo "$as_me:1950: found $ac_dir/$ac_word" >&5 break done fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then echo "$as_me:1958: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:1961: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo "$as_me:1970: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_LD"; then ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_LD="ld" echo "$as_me:1985: found $ac_dir/$ac_word" >&5 break done test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="'$(CC)'" fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then echo "$as_me:1994: result: $ac_ct_LD" >&5 echo "${ECHO_T}$ac_ct_LD" >&6 else echo "$as_me:1997: result: no" >&5 echo "${ECHO_T}no" >&6 fi LD=$ac_ct_LD else LD="$ac_cv_prog_LD" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:2009: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FULL_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FULL_AR in [\\/]* | ?:[\\/]*) ac_cv_path_FULL_AR="$FULL_AR" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FULL_AR="$ac_dir/$ac_word" echo "$as_me:2026: found $ac_dir/$ac_word" >&5 break fi done ;; esac fi FULL_AR=$ac_cv_path_FULL_AR if test -n "$FULL_AR"; then echo "$as_me:2037: result: $FULL_AR" >&5 echo "${ECHO_T}$FULL_AR" >&6 else echo "$as_me:2040: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_FULL_AR"; then ac_pt_FULL_AR=$FULL_AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:2049: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_FULL_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_FULL_AR in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_FULL_AR="$ac_pt_FULL_AR" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_ac_pt_FULL_AR="$ac_dir/$ac_word" echo "$as_me:2066: found $ac_dir/$ac_word" >&5 break fi done test -z "$ac_cv_path_ac_pt_FULL_AR" && ac_cv_path_ac_pt_FULL_AR="'$(AR)'" ;; esac fi ac_pt_FULL_AR=$ac_cv_path_ac_pt_FULL_AR if test -n "$ac_pt_FULL_AR"; then echo "$as_me:2078: result: $ac_pt_FULL_AR" >&5 echo "${ECHO_T}$ac_pt_FULL_AR" >&6 else echo "$as_me:2081: result: no" >&5 echo "${ECHO_T}no" >&6 fi FULL_AR=$ac_pt_FULL_AR else FULL_AR="$ac_cv_path_FULL_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:2093: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:2108: found $ac_dir/$ac_word" >&5 break done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:2116: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:2119: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:2128: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:2143: found $ac_dir/$ac_word" >&5 break done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:2152: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:2155: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:2181: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:2191: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:2195: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:2204: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:2208: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:2213: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then echo "$as_me:2221: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:2230: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:2235: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` system_name="$host_os" else system_name="`(uname -s -r) 2>/dev/null`" if test -z "$system_name" ; then system_name="`(hostname) 2>/dev/null`" fi fi test -n "$system_name" && cat >>confdefs.h <&6 else cf_cv_system_name="$system_name" fi test -z "$system_name" && system_name="$cf_cv_system_name" test -n "$cf_cv_system_name" && echo "$as_me:2261: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then echo "$as_me:2265: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 { { echo "$as_me:2267: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi case $cf_cv_system_name in (os2*) CFLAGS="$CFLAGS -Zmt" CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__" CXXFLAGS="$CXXFLAGS -Zmt" # autoconf's macro sets -Zexe and suffix both, which conflict:w LDFLAGS="$LDFLAGS -Zmt -Zcrtdll" ac_cv_exeext=.exe ;; esac PROG_EXT="$EXEEXT" test -n "$PROG_EXT" && cat >>confdefs.h <&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 2391 "configure" #include "confdefs.h" #include int main () { #ifndef _XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2406: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2409: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2415: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_gnu_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" cat >conftest.$ac_ext <<_ACEOF #line 2424 "configure" #include "confdefs.h" #include int main () { #ifdef _XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2439: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2442: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2445: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2448: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_gnu_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_cv_gnu_source=yes fi rm -f conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$cf_save" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:2463: result: $cf_cv_gnu_source" >&5 echo "${ECHO_T}$cf_cv_gnu_source" >&6 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ;; (minix*) cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... ;; (mirbsd*) # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` echo "$as_me:2488: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo "${as_me:-configure}:2494: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF #line 2497 "configure" #include "confdefs.h" #include int main () { #ifndef _POSIX_C_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2512: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2515: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2518: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2521: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_want_posix_source=no case .$cf_POSIX_C_SOURCE in (.[12]??*) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" ;; (.2) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_want_posix_source=yes ;; (.*) cf_want_posix_source=yes ;; esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF #line 2542 "configure" #include "confdefs.h" #include int main () { #ifdef _POSIX_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2557: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2560: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2563: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2566: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "${as_me:-configure}:2577: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" echo "${as_me:-configure}:2582: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF #line 2585 "configure" #include "confdefs.h" #include int main () { #ifndef _POSIX_C_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2600: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2603: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2606: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2609: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_cv_posix_c_source=no fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:2625: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_cv_posix_c_source do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi fi ;; (netbsd*) cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; (openbsd[4-9]*) # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=600 ;; (openbsd*) # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;; (osf[45]*) cf_xopen_source="-D_OSF_SOURCE" ;; (nto-qnx*) cf_xopen_source="-D_QNX_SOURCE" ;; (sco*) # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; (solaris2.*) cf_xopen_source="-D__EXTENSIONS__" cf_cv_xopen_source=broken ;; (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2) cf_XOPEN_SOURCE= cf_POSIX_C_SOURCE= ;; (*) echo "$as_me:2743: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 2750 "configure" #include "confdefs.h" #include #include #include int main () { #ifndef _XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2769: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2772: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2775: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2778: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >conftest.$ac_ext <<_ACEOF #line 2787 "configure" #include "confdefs.h" #include #include #include int main () { #ifdef _XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2806: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2809: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2812: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2815: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$cf_save" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:2830: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then CFLAGS=`echo "$CFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_temp_xopen_source do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi fi cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` echo "$as_me:2938: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo "${as_me:-configure}:2944: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF #line 2947 "configure" #include "confdefs.h" #include int main () { #ifndef _POSIX_C_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:2962: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2965: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:2968: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2971: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_want_posix_source=no case .$cf_POSIX_C_SOURCE in (.[12]??*) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" ;; (.2) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_want_posix_source=yes ;; (.*) cf_want_posix_source=yes ;; esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF #line 2992 "configure" #include "confdefs.h" #include int main () { #ifdef _POSIX_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3007: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3010: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3013: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3016: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "${as_me:-configure}:3027: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" echo "${as_me:-configure}:3032: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF #line 3035 "configure" #include "confdefs.h" #include int main () { #ifndef _POSIX_C_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3050: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3053: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3056: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3059: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_cv_posix_c_source=no fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:3075: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_cv_posix_c_source do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi fi ;; esac if test -n "$cf_xopen_source" ; then cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_xopen_source do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 echo "${as_me:-configure}:3233: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 echo "${as_me:-configure}:3241: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 echo "${as_me:-configure}:3249: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi fi if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then echo "$as_me:3257: checking if _XOPEN_SOURCE really is set" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line 3260 "configure" #include "confdefs.h" #include int main () { #ifndef _XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3275: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3278: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3281: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3284: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_XOPEN_SOURCE_set=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_XOPEN_SOURCE_set=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:3293: result: $cf_XOPEN_SOURCE_set" >&5 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6 if test $cf_XOPEN_SOURCE_set = yes then cat >conftest.$ac_ext <<_ACEOF #line 3298 "configure" #include "confdefs.h" #include int main () { #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3313: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3316: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3319: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3322: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_XOPEN_SOURCE_set_ok=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_XOPEN_SOURCE_set_ok=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $cf_XOPEN_SOURCE_set_ok = no then { echo "$as_me:3333: WARNING: _XOPEN_SOURCE is lower than requested" >&5 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;} fi else echo "$as_me:3338: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 3345 "configure" #include "confdefs.h" #include #include #include int main () { #ifndef _XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3364: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3367: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3370: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3373: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >conftest.$ac_ext <<_ACEOF #line 3382 "configure" #include "confdefs.h" #include #include #include int main () { #ifdef _XOPEN_SOURCE make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3401: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3404: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3407: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3410: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$cf_save" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:3425: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then CFLAGS=`echo "$CFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_temp_xopen_source do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi fi fi fi if ( test "$GCC" = yes || test "$GXX" = yes ) then echo "$as_me:3525: checking if you want to check for gcc warnings" >&5 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6 # Check whether --with-warnings or --without-warnings was given. if test "${with_warnings+set}" = set; then withval="$with_warnings" cf_opt_with_warnings=$withval else cf_opt_with_warnings=no fi; echo "$as_me:3535: result: $cf_opt_with_warnings" >&5 echo "${ECHO_T}$cf_opt_with_warnings" >&6 if test "$cf_opt_with_warnings" != no ; then if test "$GCC" = yes then cat > conftest.i <&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > conftest.$ac_ext <&5 case $cf_attribute in (printf) cf_printf_attribute=yes cat >conftest.h <conftest.h <conftest.h <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3612: \$? = $ac_status" >&5 (exit $ac_status); }; then test -n "$verbose" && echo "$as_me:3614: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case $cf_attribute in (noreturn) cat >>confdefs.h <>confdefs.h <<\EOF #define GCC_PRINTF 1 EOF fi cat >>confdefs.h <>confdefs.h <<\EOF #define GCC_SCANF 1 EOF fi cat >>confdefs.h <>confdefs.h <>confdefs.h fi rm -rf conftest* fi INTEL_COMPILER=no if test "$GCC" = yes ; then case $host_os in (linux*|gnu*) echo "$as_me:3678: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >conftest.$ac_ext <<_ACEOF #line 3683 "configure" #include "confdefs.h" int main () { #ifdef __INTEL_COMPILER #else make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3700: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3703: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3706: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3709: \$? = $ac_status" >&5 (exit $ac_status); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" echo "$as_me:3720: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac fi CLANG_COMPILER=no if test "$GCC" = yes ; then echo "$as_me:3729: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Qunused-arguments" cat >conftest.$ac_ext <<_ACEOF #line 3734 "configure" #include "confdefs.h" int main () { #ifdef __clang__ #else make an error #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:3751: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3754: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:3757: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3760: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CLANG_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" echo "$as_me:3771: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi cat > conftest.$ac_ext <&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-Wall" for cf_opt in \ wd1419 \ wd1683 \ wd1684 \ wd193 \ wd593 \ wd279 \ wd810 \ wd869 \ wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" if { (eval echo "$as_me:3809: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3812: \$? = $ac_status" >&5 (exit $ac_status); }; then test -n "$verbose" && echo "$as_me:3814: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi done CFLAGS="$cf_save_CFLAGS" elif test "$GCC" = yes then { echo "$as_me:3823: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS= cf_warn_CONST="" test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings" cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs" test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings= for cf_opt in W Wall \ Wbad-function-cast \ Wcast-align \ Wcast-qual \ Wdeclaration-after-statement \ Wextra \ Winline \ Wmissing-declarations \ Wmissing-prototypes \ Wnested-externs \ Wpointer-arith \ Wshadow \ Wstrict-prototypes \ Wundef $cf_gcc_warnings $cf_warn_CONST do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" if { (eval echo "$as_me:3847: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:3850: \$? = $ac_status" >&5 (exit $ac_status); }; then test -n "$verbose" && echo "$as_me:3852: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case $cf_opt in (Wcast-qual) CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES" ;; (Winline) case $GCC_VERSION in ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 echo "${as_me:-configure}:3863: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac ;; (Wpointer-arith) case $GCC_VERSION in ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 echo "${as_me:-configure}:3873: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac ;; esac EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi done CFLAGS="$cf_save_CFLAGS" fi rm -rf conftest* fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return=return echo "$as_me:3895: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line 3916 "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:3921: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3927: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line 3950 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:3954: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3960: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:3997: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line 4007 "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:4012: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4018: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line 4041 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:4045: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4051: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:4079: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return=return echo "$as_me:4091: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. if test "${with_dmalloc+set}" = set; then withval="$with_dmalloc" cat >>confdefs.h <&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case .$with_cflags in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -g do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi ;; esac ;; esac if test "$with_dmalloc" = yes ; then echo "$as_me:4202: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4208 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:4212: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4218: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_dmalloc_h=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_header_dmalloc_h=no fi rm -f conftest.err conftest.$ac_ext fi echo "$as_me:4237: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 if test $ac_cv_header_dmalloc_h = yes; then echo "$as_me:4241: checking for dmalloc_debug in -ldmalloc" >&5 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 4249 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dmalloc_debug (); int main () { dmalloc_debug (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4268: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4271: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4274: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4277: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_dmalloc_dmalloc_debug=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4288: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. if test "${with_dbmalloc+set}" = set; then withval="$with_dbmalloc" cat >>confdefs.h <&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case .$with_cflags in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -g do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi ;; esac ;; esac if test "$with_dbmalloc" = yes ; then echo "$as_me:4414: checking for dbmalloc.h" >&5 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dbmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4420 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:4424: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4430: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_dbmalloc_h=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_header_dbmalloc_h=no fi rm -f conftest.err conftest.$ac_ext fi echo "$as_me:4449: result: $ac_cv_header_dbmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 if test $ac_cv_header_dbmalloc_h = yes; then echo "$as_me:4453: checking for debug_malloc in -ldbmalloc" >&5 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 4461 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char debug_malloc (); int main () { debug_malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4480: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4483: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4486: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4489: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_dbmalloc_debug_malloc=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4500: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. if test "${with_valgrind+set}" = set; then withval="$with_valgrind" cat >>confdefs.h <&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case .$with_cflags in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -g do case $cf_fix_cppflags in (no) case $cf_add_cflags in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case $cf_add_cflags in (-D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case $cf_add_cflags in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; (*) cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac ;; (yes) cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi ;; esac ;; esac echo "$as_me:4625: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. if test "${enable_leaks+set}" = set; then enableval="$enable_leaks" if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi else : ${with_no_leaks:=no} fi; echo "$as_me:4635: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$with_no_leaks" = yes ; then cat >>confdefs.h <<\EOF #define NO_LEAKS 1 EOF cat >>confdefs.h <<\EOF #define YY_NO_LEAKS 1 EOF fi for ac_prog in perl perl5 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:4654: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_PERL="$ac_prog" echo "$as_me:4669: found $ac_dir/$ac_word" >&5 break done fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then echo "$as_me:4677: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6 else echo "$as_me:4680: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$PERL" && break done test -n "$PERL" || PERL="none" if test "$PERL" = none then { { echo "$as_me:4690: error: no perl found" >&5 echo "$as_me: error: no perl found" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:4695: checking if you want to use cdk5-config for C flags" >&5 echo $ECHO_N "checking if you want to use cdk5-config for C flags... $ECHO_C" >&6 # Check whether --with-cdk or --without-cdk was given. if test "${with_cdk+set}" = set; then withval="$with_cdk" with_cdk="cdk5-config" else with_cdk=no fi; echo "$as_me:4705: result: $with_cdk" >&5 echo "${ECHO_T}$with_cdk" >&6 echo "$as_me:4708: checking if you want to use cdkw5-config for C flags" >&5 echo $ECHO_N "checking if you want to use cdkw5-config for C flags... $ECHO_C" >&6 # Check whether --with-cdkw or --without-cdkw was given. if test "${with_cdkw+set}" = set; then withval="$with_cdkw" with_cdk="cdkw5-config" else with_cdk=no fi; echo "$as_me:4718: result: $with_cdk" >&5 echo "${ECHO_T}$with_cdk" >&6 if test $with_cdk = no then echo "$as_me:4723: checking for cdk.h" >&5 echo $ECHO_N "checking for cdk.h... $ECHO_C" >&6 if test "${ac_cv_header_cdk_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4729 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:4733: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4739: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_cdk_h=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_header_cdk_h=no fi rm -f conftest.err conftest.$ac_ext fi echo "$as_me:4758: result: $ac_cv_header_cdk_h" >&5 echo "${ECHO_T}$ac_cv_header_cdk_h" >&6 if test $ac_cv_header_cdk_h = yes; then : else cf_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/usr/include/cdk" echo "$as_me:4766: checking for cdk/cdk.h" >&5 echo $ECHO_N "checking for cdk/cdk.h... $ECHO_C" >&6 if test "${ac_cv_header_cdk_cdk_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line 4772 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:4776: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:4782: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_cdk_cdk_h=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_header_cdk_cdk_h=no fi rm -f conftest.err conftest.$ac_ext fi echo "$as_me:4801: result: $ac_cv_header_cdk_cdk_h" >&5 echo "${ECHO_T}$ac_cv_header_cdk_cdk_h" >&6 if test $ac_cv_header_cdk_cdk_h = yes; then cat >>confdefs.h <<\EOF #define HAVE_CDK_CDK_H 1 EOF else { { echo "$as_me:4811: error: cannot find cdk header file" >&5 echo "$as_me: error: cannot find cdk header file" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:4819: checking for initCDKScreen in -lcdk" >&5 echo $ECHO_N "checking for initCDKScreen in -lcdk... $ECHO_C" >&6 if test "${ac_cv_lib_cdk_initCDKScreen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdk $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 4827 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initCDKScreen (); int main () { initCDKScreen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4846: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4849: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4852: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4855: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cdk_initCDKScreen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_cdk_initCDKScreen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4866: result: $ac_cv_lib_cdk_initCDKScreen" >&5 echo "${ECHO_T}$ac_cv_lib_cdk_initCDKScreen" >&6 if test $ac_cv_lib_cdk_initCDKScreen = yes; then LIBS="-lcdk $LIBS" else echo "$as_me:4872: checking for initCDKScreen in -lcdkw" >&5 echo $ECHO_N "checking for initCDKScreen in -lcdkw... $ECHO_C" >&6 if test "${ac_cv_lib_cdkw_initCDKScreen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdkw $LIBS" cat >conftest.$ac_ext <<_ACEOF #line 4880 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initCDKScreen (); int main () { initCDKScreen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:4899: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4902: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:4905: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4908: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cdkw_initCDKScreen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_cdkw_initCDKScreen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4919: result: $ac_cv_lib_cdkw_initCDKScreen" >&5 echo "${ECHO_T}$ac_cv_lib_cdkw_initCDKScreen" >&6 if test $ac_cv_lib_cdkw_initCDKScreen = yes; then LIBS="-lcdkw $LIBS" else { { echo "$as_me:4925: error: cannot find cdk library" >&5 echo "$as_me: error: cannot find cdk library" >&2;} { (exit 1); exit 1; }; } fi fi elif $with_cdk --version 2>/dev/null >/dev/null then CFLAGS=`$with_cdk --cflags` LIBS=`$with_cdk --libs` else { { echo "$as_me:4937: error: cannot use $cdk_config script" >&5 echo "$as_me: error: cannot use $cdk_config script" >&2;} { (exit 1); exit 1; }; } fi ### output makefile script ac_config_files="$ac_config_files Makefile.PL" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overriden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\EOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p EOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:5054: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated automatically by configure. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false SHELL=\${CONFIG_SHELL-$SHELL} ac_cs_invocation="\$0 \$@" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Name of the executable. as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # NLS nuisances. $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } exec 6>&1 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\EOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." EOF cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` shift set dummy "$ac_option" "$ac_optarg" ${1+"$@"} shift ;; -*);; *) # This is not an option, so the user has probably given explicit # arguments. ac_need_defaults=false;; esac case $1 in # Handling of the options. EOF cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:5224: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) shift CONFIG_FILES="$CONFIG_FILES $1" ac_need_defaults=false;; --header | --heade | --head | --hea ) shift CONFIG_HEADERS="$CONFIG_HEADERS $1" ac_need_defaults=false;; # This is an error. -*) { { echo "$as_me:5243: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done exec 5>>config.log cat >&5 << _ACEOF ## ----------------------- ## ## Running config.status. ## ## ----------------------- ## This file was extended by $as_me 2.52.20150926, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS > $ac_cs_invocation on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF EOF cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile.PL" ) CONFIG_FILES="$CONFIG_FILES Makefile.PL" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) { { echo "$as_me:5289: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. : ${TMPDIR=/tmp} { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/cs$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } EOF cat >>$CONFIG_STATUS <\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datarootdir@,$datarootdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t s,@VERSION@,$VERSION,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@LD@,$LD,;t t s,@ac_ct_LD@,$ac_ct_LD,;t t s,@FULL_AR@,$FULL_AR,;t t s,@ac_pt_FULL_AR@,$ac_pt_FULL_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@PROG_EXT@,$PROG_EXT,;t t s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t s,@CPP@,$CPP,;t t s,@PERL@,$PERL,;t t CEOF EOF cat >>$CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed # It is possible to make a multiline substitution using escaped newlines. # Ensure that we do not split the substitution between script fragments. ac_BEG=$ac_end ac_END=`expr $ac_end + $ac_max_sed_lines` sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next if test -s $tmp/subs.next; then grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit if test ! -s $tmp/subs.edit; then grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit if test ! -s $tmp/subs.edit; then if test $ac_beg -gt 1; then ac_end=`expr $ac_end - 1` continue fi fi fi fi if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" EOF cat >>$CONFIG_STATUS <<\EOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac as_dummy="$ac_dir" for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do case $as_mkdir_dir in # Skip DOS drivespec ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir test -d "$as_incr_dir" || mkdir "$as_incr_dir" ;; esac done; } ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else ac_dir_suffix= ac_dots= fi case $srcdir in .) ac_srcdir=. if test -z "$ac_dots"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_dots$srcdir$ac_dir_suffix ac_top_srcdir=$ac_dots$srcdir ;; esac if test x"$ac_file" != x-; then { echo "$as_me:5528: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated automatically by config.status. */ configure_input="Generated automatically from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:5546: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:5559: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } EOF cat >>$CONFIG_STATUS <<\EOF ac_warn_datarootdir=no if test x"$ac_file" != x-; then for ac_item in $ac_file_inputs do ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item` if test -n "$ac_seen"; then ac_used=`grep '@datarootdir@' $ac_item` if test -z "$ac_used"; then { echo "$as_me:5575: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&2;} ac_warn_datarootdir=yes fi fi ac_seen=`grep '${datarootdir}' $ac_item` if test -n "$ac_seen"; then { echo "$as_me:5584: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&2;} ac_warn_datarootdir=yes fi done fi if test "x$ac_warn_datarootdir" = xyes; then ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'" fi EOF cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then cp $tmp/out $ac_file for ac_name in prefix exec_prefix datarootdir do ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file` if test -n "$ac_seen"; then ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file` if test -z "$ac_init"; then ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'` { echo "$as_me:5620: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&5 echo "$as_me: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&2;} fi fi done egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out if test -s $tmp/out; then ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out` { echo "$as_me:5631: WARNING: Some variables may not be substituted: $ac_seen" >&5 echo "$as_me: WARNING: Some variables may not be substituted: $ac_seen" >&2;} fi else cat $tmp/out fi rm -f $tmp/out done EOF cat >>$CONFIG_STATUS <<\EOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` case $ac_dest in default ) # move confdefs.h aside while using perl, since it gets confused test -f "confdefs.h" && mv confdefs.h confdefs.hdr $PERL Makefile.PL test -f "confdefs.hdr" && mv confdefs.hdr confdefs.h # add to the distclean rule to cleanup files created by the configure script cat >>Makefile <Makefile.old echo "** updated Makefile to allow in-tree test-builds" diff Makefile Makefile.old mv Makefile.old Makefile fi ;; esac done EOF cat >>$CONFIG_STATUS <<\EOF { (exit 0); exit 0; } EOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: exec 5>/dev/null $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi cdk-perl-20150928/COPYING0000644000175100001440000000347412602361667013262 0ustar tomusers-- $Id: COPYING,v 1.6 2015/09/29 01:04:55 tom Exp $ ------------------------------------------------------------------------------- Copyright 1999, Mike Glover Modifications copyright 1999-2014,2015 Thomas Dickey All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: This product includes software developed by Mike Glover and contributors. 4. Neither the name of Mike Glover nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY MIKE GLOVER AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MIKE GLOVER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cdk-perl-20150928/typemap0000644000175100001440000000122606634015407013616 0ustar tomusersWINDOW * T_PTROBJ CDKARRAY * T_PTROBJ CDKSCREEN * T_PTROBJ CDKLABEL * T_PTROBJ CDKDIALOG * T_PTROBJ CDKENTRY * T_PTROBJ CDKSCROLL * T_PTROBJ CDKSCALE * T_PTROBJ CDKHISTOGRAM * T_PTROBJ CDKMENU * T_PTROBJ CDKMENTRY * T_PTROBJ CDKMATRIX * T_PTROBJ CDKMARQUEE * T_PTROBJ CDKSELECTION * T_PTROBJ CDKVIEWER * T_PTROBJ CDKGRAPH * T_PTROBJ CDKRADIO * T_PTROBJ CDKTEMPLATE * T_PTROBJ CDKSWINDOW * T_PTROBJ CDKITEMLIST * T_PTROBJ CDKFSELECT * T_PTROBJ CDKSLIDER * T_PTROBJ CDKALPHALIST * T_PTROBJ CDKCALENDAR * T_PTROBJ CDKBUTTONBOX * T_PTROBJ chtype T_IV boolean T_IV EObjectType T_IV EDisplayType T_IV EHistogramDisplayType T_IV INPUT cdk-perl-20150928/Cdk.xs0000644000175100001440000040643212203520136013266 0ustar tomusers/* * $Author: Niko.Tyni $ * $Date: 2013/08/16 21:57:50 $ * $Revision: 1.32 $ */ #include #include #include #define CDK_PERL_EXT #ifdef HAVE_CDK_CDK_H #include #else #include #endif #undef dNOOP #define dNOOP /*EMPTY*/ /* Prior to perl5.005, the PL_ prefix wasn't used for things such as PL_rs. Define the PL_ macros that we use if necessary. */ #include /* This is perl's patchlevel.h */ #if PATCHLEVEL < 5 #define PL_na na #define PL_sv_undef sv_undef #endif static char * checkChtypeKey(chtype key); static chtype sv2chtype(SV *sv); static int sv2dtype(SV * sv); static int sv2int(SV *sv); CDKSCREEN * GCDKSCREEN = (CDKSCREEN *)NULL; WINDOW * GCWINDOW = (WINDOW *)NULL; /* this would be a function, except the menu widget relies on a fixed array */ #define MAKE_MENU_MATRIX(START,INPUT,NEWARRAY,ARRAYSIZE,ARRAYLEN) \ do { \ AV *array = (AV *)SvRV((INPUT)); \ int x, y; \ \ (ARRAYLEN) = av_len (array); \ \ for (x = 0; x <= (ARRAYLEN); x++) \ { \ SV *name = *av_fetch(array,x,FALSE); \ AV *subArray = (AV *)SvRV(name); \ int subLen = av_len (subArray); \ (ARRAYSIZE)[x+(START)] = subLen + 1; \ \ for (y=0; y <= subLen; y++) \ { \ SV *sv = *av_fetch(subArray,y,FALSE); \ (NEWARRAY)[x+(START)][y+(START)] = copyChar((char *)SvPV(sv,PL_na)); \ } \ } \ (ARRAYLEN)++; \ } while (0) static void make_int_array(int start, SV* input, int **dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = av_len(src) + 1; int x; if ((*dest = (int *)calloc((size_t) length + 2, sizeof(int *))) == 0) { croak("make_int_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = sv2int (foo); } *destlen = length; } #define MAKE_INT_ARRAY(START, INPUT, DEST, LEN) \ make_int_array(START, INPUT, &DEST, &LEN) static void make_dtype_array(int start, SV *input, int **dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = av_len(src) + 1; int x; if ((*dest = (int *)calloc((size_t) length + 2, sizeof(int *))) == 0) { croak("make_dtype_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = sv2dtype (foo); } *destlen = length; } #define MAKE_DTYPE_ARRAY(START, INPUT, DEST, LEN) \ make_dtype_array(START, INPUT, &DEST, &LEN) static void make_chtype_array(int start, SV *input, chtype **dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = av_len(src) + 1; int x; if ((*dest = (chtype *)calloc((size_t) length + 2, sizeof(chtype *))) == 0) { croak("make_chtype_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = sv2chtype (foo); } *destlen = length; } #define MAKE_CHTYPE_ARRAY(START, INPUT, DEST, LEN) \ make_chtype_array(START, INPUT, &DEST, &LEN) static void make_char_array(int start, SV *input, char ***dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = av_len(src) + 1; int x; if ((*dest = (char **)calloc((size_t) length + 2, sizeof(char *))) == 0) { croak("make_char_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = copyChar((char *)SvPV(foo,PL_na)); } *destlen = length; } #define MAKE_CHAR_ARRAY(START, INPUT, DEST, LEN) \ make_char_array(START, INPUT, &DEST, &LEN) static void make_title(SV * input, char **dest) { char *data; if (SvROK(input) && SvTYPE(SvRV(input)) == SVt_PVAV) { AV *src = (AV *)SvRV(input); int len = av_len(src) + 1; int x; int length = 2; for (x=0; x < len; x++) { SV *foo = *av_fetch(src, x, FALSE); data = (char *)SvPV(foo,PL_na); length += (int)strlen(data) + 1; } *dest = malloc((size_t)length); if (*dest == 0) croak("make_title"); **dest = '\0'; for (x=0; x < len; x++) { SV *foo = *av_fetch(src, x, FALSE); data = (char *)SvPV(foo,PL_na); if (x != 0) strcat(*dest, "\n"); strcat(*dest, data); } } else { data = (char *)SvPV(input,PL_na); *dest = malloc(strlen(data) + 1); if (*dest == 0) croak("make_title"); strcpy (*dest, data); } } #define MAKE_TITLE(INPUT, DEST) \ make_title(INPUT, &DEST) /* * The callback callback to run Perl callback routines. Are you confused??? */ static int PerlBindCB (EObjectType cdktype, void *object, void *data, chtype input) { dSP ; SV *foo = (SV*)data; int returnValueCount; char *chtypeKey, temp[10]; ENTER; SAVETMPS; PUSHMARK (sp); (void) cdktype; (void) object; /* Check which key input is... */ chtypeKey = checkChtypeKey (input); if (chtypeKey == (char *)NULL) { sprintf (temp, "%c", (char)input); XPUSHs (sv_2mortal(newSVpv(temp, 1))); } else { XPUSHs (sv_2mortal(newSVpv(chtypeKey, strlen(chtypeKey)))); } PUTBACK ; /* Call the perl subroutine. */ returnValueCount = perl_call_sv (foo, G_SCALAR); SPAGAIN; /* Check the number of values returned from this function. */ if (returnValueCount == 0) { /* They didn't return anything, let them continue. */ PUTBACK; FREETMPS; LEAVE; return 1; } /* They returned something, lets find out what it is. */ (void) POPi; PUTBACK; FREETMPS; LEAVE; return 1; } /* * The callback callback to run Perl callback routines. Are you confused??? */ static int PerlProcessCB (EObjectType cdktype, void *object, void *data, chtype input) { dSP ; SV *foo = (SV*)data; int returnValueCount, returnValue; char *chtypeKey, temp[10]; ENTER; SAVETMPS; PUSHMARK (sp); (void) cdktype; (void) object; /* Check which key input is... */ chtypeKey = checkChtypeKey (input); if (chtypeKey == (char *)NULL) { sprintf (temp, "%c", (char)input); XPUSHs (sv_2mortal(newSVpv(temp, 1))); } else { XPUSHs (sv_2mortal(newSVpv(chtypeKey, strlen(chtypeKey)))); } PUTBACK ; /* Call the perl subroutine. */ returnValueCount = perl_call_sv (foo, G_SCALAR); SPAGAIN; /* Check the number of values returned from this function. */ if (returnValueCount == 0) { /* They didn't return anything, let them continue. */ PUTBACK; FREETMPS; LEAVE; return 1; } /* They returned something, lets find out what it is. */ returnValue = POPi; PUTBACK; FREETMPS; LEAVE; return returnValue; } static void checkCdkInit(void) { if (GCDKSCREEN == (CDKSCREEN *)NULL) { croak ("Cdk has not been initialized.\n"); } } static char * checkChtypeKey(chtype key) { char *result = 0; if (key == KEY_UP) result = "KEY_UP"; else if (key == KEY_DOWN) result = "KEY_DOWN"; else if (key == KEY_LEFT) result = "KEY_LEFT"; else if (key == KEY_RIGHT) result = "KEY_RIGHT"; else if (key == KEY_NPAGE) result = "KEY_NPAGE"; else if (key == KEY_PPAGE) result = "KEY_PPAGE"; else if (key == KEY_END) result = "KEY_END"; else if (key == KEY_HOME) result = "KEY_HOME"; else if (key == KEY_BACKSPACE) result = "KEY_BACKSPACE"; else if (key == DELETE) result = "KEY_DELETE"; else if (key == KEY_ESC) result = "KEY_ESC"; return result; } static int sv2integer(SV *sv, int invalid) { char *from = SvPV(sv,PL_na); char mark; int result; if (sscanf(from, "%d%c", &result, &mark) != 1) { result = invalid; } return result; } static chtype sv2chtype(SV *sv) { bool found = FALSE; chtype result = 0; if (SvPOK(sv)) { char *name = SvPV(sv,PL_na); chtype *fillerChtype; int c1, c2; found = TRUE; if (strEQ(name, "ACS_BTEE")) result = ACS_BTEE; else if (strEQ(name, "ACS_HLINE")) result = ACS_HLINE; else if (strEQ(name, "ACS_LLCORNER")) result = ACS_LLCORNER; else if (strEQ(name, "ACS_LRCORNER")) result = ACS_LRCORNER; else if (strEQ(name, "ACS_LTEE")) result = ACS_LTEE; else if (strEQ(name, "ACS_PLUS")) result = ACS_PLUS; else if (strEQ(name, "ACS_RTEE")) result = ACS_RTEE; else if (strEQ(name, "ACS_TTEE")) result = ACS_TTEE; else if (strEQ(name, "ACS_ULCORNER")) result = ACS_ULCORNER; else if (strEQ(name, "ACS_URCORNER")) result = ACS_URCORNER; else if (strEQ(name, "ACS_VLINE")) result = ACS_VLINE; else if (strEQ(name, "A_ALTCHARSET")) result = A_ALTCHARSET; else if (strEQ(name, "A_ATTRIBUTES")) result = A_ATTRIBUTES; else if (strEQ(name, "A_BLINK")) result = A_BLINK; else if (strEQ(name, "A_BOLD")) result = A_BOLD; else if (strEQ(name, "A_CHARTEXT")) result = A_CHARTEXT; else if (strEQ(name, "A_COLOR")) result = A_COLOR; else if (strEQ(name, "A_DIM")) result = A_DIM; else if (strEQ(name, "A_INVIS")) result = A_INVIS; else if (strEQ(name, "A_NORMAL")) result = A_NORMAL; else if (strEQ(name, "A_PROTECT")) result = A_PROTECT; else if (strEQ(name, "A_REVERSE")) result = A_REVERSE; else if (strEQ(name, "A_STANDOUT")) result = A_STANDOUT; else if (strEQ(name, "A_UNDERLINE")) result = A_UNDERLINE; else if (strEQ(name, "CDK_COPY")) result = CDK_COPY; else if (strEQ(name, "CDK_CUT")) result = CDK_CUT; else if (strEQ(name, "CDK_ERASE")) result = CDK_ERASE; else if (strEQ(name, "CDK_PASTE")) result = CDK_PASTE; else if (strEQ(name, "CDK_REFRESH")) result = CDK_REFRESH; #ifdef COLOR else if (strEQ(name, "COLOR_BLACK")) result = COLOR_BLACK; else if (strEQ(name, "COLOR_BLUE")) result = COLOR_BLUE; else if (strEQ(name, "COLOR_CYAN")) result = COLOR_CYAN; else if (strEQ(name, "COLOR_GREEN")) result = COLOR_GREEN; else if (strEQ(name, "COLOR_MAGENTA")) result = COLOR_MAGENTA; else if (strEQ(name, "COLOR_RED")) result = COLOR_RED; else if (strEQ(name, "COLOR_WHITE")) result = COLOR_WHITE; else if (strEQ(name, "COLOR_YELLOW")) result = COLOR_YELLOW; #endif else if (strEQ(name, "DELETE")) result = DELETE; else if (strEQ(name, "KEY_A1")) result = KEY_A1; else if (strEQ(name, "KEY_A3")) result = KEY_A3; else if (strEQ(name, "KEY_B2")) result = KEY_B2; else if (strEQ(name, "KEY_BACKSPACE")) result = KEY_BACKSPACE; else if (strEQ(name, "KEY_BEG")) result = KEY_BEG; else if (strEQ(name, "KEY_BREAK")) result = KEY_BREAK; else if (strEQ(name, "KEY_BTAB")) result = KEY_BTAB; else if (strEQ(name, "KEY_C1")) result = KEY_C1; else if (strEQ(name, "KEY_C3")) result = KEY_C3; else if (strEQ(name, "KEY_CANCEL")) result = KEY_CANCEL; else if (strEQ(name, "KEY_CATAB")) result = KEY_CATAB; else if (strEQ(name, "KEY_CLEAR")) result = KEY_CLEAR; else if (strEQ(name, "KEY_CLOSE")) result = KEY_CLOSE; else if (strEQ(name, "KEY_COMMAND")) result = KEY_COMMAND; else if (strEQ(name, "KEY_COPY")) result = KEY_COPY; else if (strEQ(name, "KEY_CREATE")) result = KEY_CREATE; else if (strEQ(name, "KEY_CTAB")) result = KEY_CTAB; else if (strEQ(name, "KEY_DC")) result = KEY_DC; else if (strEQ(name, "KEY_DL")) result = KEY_DL; else if (strEQ(name, "KEY_DOWN")) result = KEY_DOWN; else if (strEQ(name, "KEY_EIC")) result = KEY_EIC; else if (strEQ(name, "KEY_END")) result = KEY_END; else if (strEQ(name, "KEY_ENTER")) result = KEY_ENTER; else if (strEQ(name, "KEY_EOL")) result = KEY_EOL; else if (strEQ(name, "KEY_EOS")) result = KEY_EOS; else if (strEQ(name, "KEY_ESC")) result = KEY_ESC; else if (strEQ(name, "KEY_EXIT")) result = KEY_EXIT; else if (strEQ(name, "KEY_F0")) result = KEY_F0; else if (strEQ(name, "KEY_F1")) result = KEY_F1; else if (strEQ(name, "KEY_F10")) result = KEY_F10; else if (strEQ(name, "KEY_F11")) result = KEY_F11; else if (strEQ(name, "KEY_F12")) result = KEY_F12; else if (strEQ(name, "KEY_F2")) result = KEY_F2; else if (strEQ(name, "KEY_F3")) result = KEY_F3; else if (strEQ(name, "KEY_F4")) result = KEY_F4; else if (strEQ(name, "KEY_F5")) result = KEY_F5; else if (strEQ(name, "KEY_F6")) result = KEY_F6; else if (strEQ(name, "KEY_F7")) result = KEY_F7; else if (strEQ(name, "KEY_FIND")) result = KEY_FIND; else if (strEQ(name, "KEY_HELP")) result = KEY_HELP; else if (strEQ(name, "KEY_HOME")) result = KEY_HOME; else if (strEQ(name, "KEY_IC")) result = KEY_IC; else if (strEQ(name, "KEY_IL")) result = KEY_IL; else if (strEQ(name, "KEY_LEFT")) result = KEY_LEFT; else if (strEQ(name, "KEY_LL")) result = KEY_LL; else if (strEQ(name, "KEY_MARK")) result = KEY_MARK; else if (strEQ(name, "KEY_MAX")) result = KEY_MAX; else if (strEQ(name, "KEY_MESSAGE")) result = KEY_MESSAGE; else if (strEQ(name, "KEY_MIN")) result = KEY_MIN; else if (strEQ(name, "KEY_MOVE")) result = KEY_MOVE; else if (strEQ(name, "KEY_NPAGE")) result = KEY_NPAGE; else if (strEQ(name, "KEY_OPEN")) result = KEY_OPEN; else if (strEQ(name, "KEY_OPTIONS")) result = KEY_OPTIONS; else if (strEQ(name, "KEY_PPAGE")) result = KEY_PPAGE; else if (strEQ(name, "KEY_PREVIOUS")) result = KEY_PREVIOUS; else if (strEQ(name, "KEY_PRINT")) result = KEY_PRINT; else if (strEQ(name, "KEY_REDO")) result = KEY_REDO; else if (strEQ(name, "KEY_REFERENCE")) result = KEY_REFERENCE; else if (strEQ(name, "KEY_REFRESH")) result = KEY_REFRESH; else if (strEQ(name, "KEY_REPLACE")) result = KEY_REPLACE; else if (strEQ(name, "KEY_RESET")) result = KEY_RESET; else if (strEQ(name, "KEY_RESTART")) result = KEY_RESTART; else if (strEQ(name, "KEY_RESUME")) result = KEY_RESUME; else if (strEQ(name, "KEY_RETURN")) result = KEY_RETURN; else if (strEQ(name, "KEY_RIGHT")) result = KEY_RIGHT; else if (strEQ(name, "KEY_SAVE")) result = KEY_SAVE; else if (strEQ(name, "KEY_SBEG")) result = KEY_SBEG; else if (strEQ(name, "KEY_SCANCEL")) result = KEY_SCANCEL; else if (strEQ(name, "KEY_SCOMMAND")) result = KEY_SCOMMAND; else if (strEQ(name, "KEY_SCOPY")) result = KEY_SCOPY; else if (strEQ(name, "KEY_SCREATE")) result = KEY_SCREATE; else if (strEQ(name, "KEY_SDC")) result = KEY_SDC; else if (strEQ(name, "KEY_SDL")) result = KEY_SDL; else if (strEQ(name, "KEY_SELECT")) result = KEY_SELECT; else if (strEQ(name, "KEY_SEND")) result = KEY_SEND; else if (strEQ(name, "KEY_SEOL")) result = KEY_SEOL; else if (strEQ(name, "KEY_SEXIT")) result = KEY_SEXIT; else if (strEQ(name, "KEY_SF")) result = KEY_SF; else if (strEQ(name, "KEY_SFIND")) result = KEY_SFIND; else if (strEQ(name, "KEY_SHELP")) result = KEY_SHELP; else if (strEQ(name, "KEY_SHOME")) result = KEY_SHOME; else if (strEQ(name, "KEY_SIC")) result = KEY_SIC; else if (strEQ(name, "KEY_SLEFT")) result = KEY_SLEFT; else if (strEQ(name, "KEY_SMESSAGE")) result = KEY_SMESSAGE; else if (strEQ(name, "KEY_SMOVE")) result = KEY_SMOVE; else if (strEQ(name, "KEY_SNEXT")) result = KEY_SNEXT; else if (strEQ(name, "KEY_SOPTIONS")) result = KEY_SOPTIONS; else if (strEQ(name, "KEY_SPREVIOUS")) result = KEY_SPREVIOUS; else if (strEQ(name, "KEY_SPRINT")) result = KEY_SPRINT; else if (strEQ(name, "KEY_SR")) result = KEY_SR; else if (strEQ(name, "KEY_SREDO")) result = KEY_SREDO; else if (strEQ(name, "KEY_SREPLACE")) result = KEY_SREPLACE; else if (strEQ(name, "KEY_SRESET")) result = KEY_SRESET; else if (strEQ(name, "KEY_SRIGHT")) result = KEY_SRIGHT; else if (strEQ(name, "KEY_SRSUME")) result = KEY_SRSUME; else if (strEQ(name, "KEY_SSAVE")) result = KEY_SSAVE; else if (strEQ(name, "KEY_SSUSPEND")) result = KEY_SSUSPEND; else if (strEQ(name, "KEY_STAB")) result = KEY_STAB; else if (strEQ(name, "KEY_SUNDO")) result = KEY_SUNDO; else if (strEQ(name, "KEY_SUSPEND")) result = KEY_SUSPEND; else if (strEQ(name, "KEY_TAB")) result = KEY_TAB; else if (strEQ(name, "KEY_UNDO")) result = KEY_UNDO; else if (strEQ(name, "KEY_UP")) result = KEY_UP; else if (strEQ(name, "SPACE")) result = SPACE; else if (strEQ(name, "TAB")) result = TAB; /* Else they used a format of to specify a chtype. */ else if ((fillerChtype = char2Chtype (name, &c1, &c2)) != 0) { result = fillerChtype[0]; freeChtype (fillerChtype); } else found = FALSE; } if (!found) { result = (chtype)sv2integer(sv, 0); } return result; } static int sv2dtype(SV * sv) { bool found = FALSE; int result = vINVALID; if (SvPOK(sv)) { char *name = SvPV(sv,PL_na); found = TRUE; if (strEQ (name, "CHAR")) result = vCHAR; else if (strEQ (name, "HCHAR")) result = vHCHAR; else if (strEQ (name, "INT")) result = vINT; else if (strEQ (name, "HINT")) result = vHINT; else if (strEQ (name, "MIXED")) result = vMIXED; else if (strEQ (name, "HMIXED")) result = vHMIXED; else if (strEQ (name, "UCHAR")) result = vUCHAR; else if (strEQ (name, "LCHAR")) result = vLCHAR; else if (strEQ (name, "UHCHAR")) result = vUHCHAR; else if (strEQ (name, "LHCHAR")) result = vLHCHAR; else if (strEQ (name, "UMIXED")) result = vUMIXED; else if (strEQ (name, "LMIXED")) result = vLMIXED; else if (strEQ (name, "UHMIXED")) result = vUHMIXED; else if (strEQ (name, "LHMIXED")) result = vLHMIXED; else if (strEQ (name, "VIEWONLY")) result = vVIEWONLY; else if (strEQ (name, "NONE")) result = vNONE; else if (strEQ (name, "PERCENT")) result = vPERCENT; else if (strEQ (name, "REAL")) result = vREAL; else if (strEQ (name, "PLOT")) result = vPLOT; else if (strEQ (name, "LINE")) result = vLINE; else found = FALSE; } if (!found) { result = sv2integer(sv, vINVALID); } return result; } static int sv2int(SV *sv) { bool found = FALSE; int result = 0; if (SvPOK(sv)) { char *name = SvPV(sv,PL_na); found = TRUE; if (strEQ(name, "BOTTOM")) result = BOTTOM; else if (strEQ(name, "CENTER")) result = CENTER; else if (strEQ(name, "COL")) result = COL; else if (strEQ(name, "FALSE")) result = FALSE; else if (strEQ(name, "FULL")) result = FULL; else if (strEQ(name, "HORIZONTAL")) result = HORIZONTAL; else if (strEQ(name, "LEFT")) result = LEFT; else if (strEQ(name, "NONE")) result = NONE; else if (strEQ(name, "NONUMBERS")) result = NONUMBERS; else if (strEQ(name, "NUMBERS")) result = NUMBERS; else if (strEQ(name, "RIGHT")) result = RIGHT; else if (strEQ(name, "ROW")) result = ROW; else if (strEQ(name, "TRUE")) result = TRUE; else if (strEQ(name, "TOP")) result = TOP; else if (strEQ(name, "VERTICAL")) result = VERTICAL; else found = FALSE; } if (!found) { result = sv2integer(sv, 0); } return result; } #if 0 static char * sv2CharPtr(SV *inp) { char *name = (char *)SvPV(inp,PL_na); return (name); } static int not_here(char *s) { croak("%s not implemented on this architecture", s); return -1; } #endif static double constant(char *name, int arg) { (void)arg; errno = 0; switch (*name) { case 'A': break; case 'B': break; case 'C': break; case 'D': break; case 'E': break; case 'F': break; case 'G': break; case 'H': break; case 'I': break; case 'J': break; case 'K': break; case 'L': break; case 'M': break; case 'N': break; case 'O': break; case 'P': break; case 'Q': break; case 'R': break; case 'S': break; case 'T': break; case 'U': break; case 'V': break; case 'W': break; case 'X': break; case 'Y': break; case 'Z': break; } errno = EINVAL; return 0; #if 0 not_there: errno = ENOENT; return 0; #endif } MODULE = Cdk PACKAGE = Cdk const char * getVersion() CODE: { RETVAL = CDKVersion(); } OUTPUT: RETVAL double constant(name,arg) char * name int arg void Beep() CODE: { Beep(); } CDKSCREEN * init() CODE: { GCWINDOW = initscr(); GCDKSCREEN = initCDKScreen (GCWINDOW); /* Start the colors. */ initCDKColor(); RETVAL = GCDKSCREEN; } OUTPUT: RETVAL long getColor(pair) int pair CODE: { (void) targ; RETVAL = COLOR_PAIR(pair); } OUTPUT: RETVAL void end() CODE: { /* Kill the main screen. */ destroyCDKScreen (GCDKSCREEN); /* Remove the curses window. */ delwin (GCWINDOW); /* Shut down curses. */ endCDK(); kill (0, 2); } CDKSCREEN * getCdkScreen() CODE: { RETVAL = GCDKSCREEN; } OUTPUT: RETVAL void getCdkScreenDim() PPCODE: { XPUSHs (sv_2mortal(newSViv(GCDKSCREEN->window->_maxy))); XPUSHs (sv_2mortal(newSViv(GCDKSCREEN->window->_maxx))); } WINDOW * getCdkWindow() CODE: { RETVAL = GCDKSCREEN->window; } OUTPUT: RETVAL void refreshCdkScreen() CODE: { refreshCDKScreen (GCDKSCREEN); } void eraseCdkScreen() CODE: { eraseCDKScreen (GCDKSCREEN); } void destroyCdkScreen() CODE: { destroyCDKScreen(GCDKSCREEN); } void DrawMesg(window,mesg,attrib=A_NORMAL,xpos=CENTER,ypos=CENTER,align=HORIZONTAL) WINDOW * window char * mesg chtype attrib = sv2chtype ($arg); int xpos = sv2int ($arg); int ypos = sv2int ($arg); int align = sv2int ($arg); CODE: { int mesgLen = (int) strlen (mesg); writeCharAttrib (window, xpos, ypos, mesg, attrib, align, 0, mesgLen); } chtype getch() void raw() void noraw() PROTOTYPES: DISABLE MODULE = Cdk PACKAGE = Cdk::Label CDKLABEL * New(mesg,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * mesg int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKLABEL * widget = (CDKLABEL *)NULL; char ** message; int messageLines; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, mesg, message, messageLines); widget = newCDKLabel (GCDKSCREEN, xPos, yPos, message, messageLines, Box, shadow); free (message); /* Check the return value. */ if (widget == (CDKLABEL *)NULL) { croak ("Cdk::Label Could not create widget. Is the window too small?\n"); } else { RETVAL = widget; } } OUTPUT: RETVAL void SetMessage(object,mesg) CDKLABEL * object SV * mesg CODE: { char ** message; int messageLines; MAKE_CHAR_ARRAY (0, mesg, message, messageLines); setCDKLabelMessage (object, message, messageLines); free (message); } void SetBox(object,Box=TRUE) CDKLABEL * object int Box = sv2int ($arg); CODE: { setCDKLabelBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKLABEL * object char * color CODE: { setCDKLabelBackgroundColor (object,color); } void Draw(object,Box=TRUE) CDKLABEL * object int Box = sv2int ($arg); CODE: { drawCDKLabel (object, Box); } void Erase(object) CDKLABEL * object CODE: { eraseCDKLabel(object); } char Wait(object, key=0) CDKLABEL * object chtype key = sv2chtype ($arg); CODE: { RETVAL = waitCDKLabel (object, (char) key); } OUTPUT: RETVAL void Register(object) CDKLABEL * object CODE: { registerCDKObject (GCDKSCREEN, vLABEL, object); } void Unregister(object) CDKLABEL * object CODE: { unregisterCDKObject (vLABEL, object); } void Raise(object) CDKLABEL * object CODE: { raiseCDKObject (vLABEL, object); } void Lower(object) CDKLABEL * object CODE: { lowerCDKObject (vLABEL, object); } WINDOW * GetWindow(object) CDKLABEL * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Dialog CDKDIALOG * New(message,buttons,xPos=CENTER,yPos=CENTER,highlight=A_REVERSE,seperator=TRUE,Box=TRUE,shadow=FALSE) SV * message SV * buttons int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype highlight = sv2chtype ($arg); int seperator = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKDIALOG * dialogWidget = (CDKDIALOG *)NULL; char ** Message; char ** Buttons; int buttonCount; int rowCount; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, message, Message, rowCount); MAKE_CHAR_ARRAY (0, buttons, Buttons, buttonCount); dialogWidget = newCDKDialog (GCDKSCREEN,xPos,yPos, Message,rowCount, Buttons,buttonCount, highlight,seperator, Box,shadow); free (Message); free (Buttons); /* Check the return type. */ if (dialogWidget == (CDKDIALOG *)NULL) { croak ("Cdk::Dialog Could not create widget. Is the window too small?\n"); } else { RETVAL = dialogWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKDIALOG * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKDialog (object, Keys); free (Keys); } else { value = activateCDKDialog (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKDIALOG * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKDialog (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKDIALOG * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vDIALOG, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKDIALOG * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKDialogPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKDIALOG * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKDialogPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKDIALOG * object int Box = sv2int ($arg); CODE: { drawCDKDialog (object,Box); } void Erase(object) CDKDIALOG * object CODE: { eraseCDKDialog (object); } void SetHighlight(object,highlight=A_REVERSE) CDKDIALOG * object chtype highlight = sv2chtype ($arg); CODE: { setCDKDialogHighlight (object,highlight); } void SetSeparator(object,separator=TRUE) CDKDIALOG * object int separator CODE: { setCDKDialogSeparator (object,separator); } void SetBox(object,Box=TRUE) CDKDIALOG * object int Box = sv2int ($arg); CODE: { setCDKDialogBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKDIALOG * object char * color CODE: { setCDKDialogBackgroundColor (object,color); } void Register(object) CDKDIALOG * object CODE: { registerCDKObject (GCDKSCREEN, vDIALOG, object); } void Unregister(object) CDKDIALOG * object CODE: { unregisterCDKObject (vDIALOG, object); } void Raise(object) CDKDIALOG * object CODE: { raiseCDKObject (vDIALOG, object); } void Lower(object) CDKDIALOG * object CODE: { lowerCDKObject (vDIALOG, object); } WINDOW * GetWindow(object) CDKDIALOG * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Scroll CDKSCROLL * New (title,mesg,height,width,xPos=CENTER,yPos=CENTER,sPos=RIGHT,numbers=TRUE,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * mesg int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int sPos = sv2int ($arg); int numbers = sv2int ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSCROLL * scrollWidget = 0; char ** Message; char * Title; int mesglen; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY(0, mesg, Message, mesglen); MAKE_TITLE (title,Title); scrollWidget = newCDKScroll (GCDKSCREEN, xPos, yPos, sPos, height, width, Title, Message, mesglen, numbers, highlight, Box, shadow); free (Message); free (Title); /* Check the return type. */ if (scrollWidget == (CDKSCROLL *)NULL) { croak ("Cdk::Scroll Could not create widget. Is the window too small?\n"); } else { RETVAL = scrollWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKSCROLL * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKScroll (object, Keys); free (Keys); } else { value = activateCDKScroll (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKSCROLL * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKScroll (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Add(object,line) CDKSCROLL * object char * line CODE: { addCDKScrollItem (object,line); } void Delete(object,position) CDKSCROLL * object int position = sv2int ($arg); CODE: { deleteCDKScrollItem (object,position); } void Bind(object,key,functionRef) CDKSCROLL * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSCROLL, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSCROLL * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScrollPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSCROLL * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScrollPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSCROLL * object int Box = sv2int ($arg); CODE: { drawCDKScroll (object,Box); } void Erase(object) CDKSCROLL * object CODE: { eraseCDKScroll(object); } void Info(object) CDKSCROLL * object PPCODE: { int currentItem = object->currentItem; int size = object->listSize; XPUSHs (sv_2mortal (newSViv(size))); XPUSHs (sv_2mortal (newSViv(currentItem))); } void SetItems(object,cItems,numbers=FALSE) CDKSCROLL * object SV * cItems int numbers = sv2int ($arg); CODE: { char ** Items; int itemLength; MAKE_CHAR_ARRAY(0, cItems, Items, itemLength); setCDKScrollItems (object, Items, itemLength, numbers); free (Items); } void SetHighlight(object,highlight) CDKSCROLL * object chtype highlight = sv2chtype ($arg); CODE: { setCDKScrollHighlight (object,highlight); } void SetBox(object,Box=TRUE) CDKSCROLL * object int Box = sv2int ($arg); CODE: { setCDKScrollBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSCROLL * object char * color CODE: { setCDKScrollBackgroundColor (object,color); } void Register(object) CDKSCROLL * object CODE: { registerCDKObject (GCDKSCREEN, vSCROLL, object); } void Unregister(object) CDKSCROLL * object CODE: { unregisterCDKObject (vSCROLL, object); } void Raise(object) CDKSCROLL * object CODE: { raiseCDKObject (vSCROLL, object); } void Lower(object) CDKSCROLL * object CODE: { lowerCDKObject (vSCROLL, object); } WINDOW * GetWindow(object) CDKSCROLL * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Scale CDKSCALE * New(title,label,start,low,high,inc,fastinc,fieldwidth,xPos=CENTER,yPos=CENTER,fieldattr=A_NORMAL,Box=TRUE,shadow=FALSE) SV * title char * label int start int low int high int inc int fastinc int fieldwidth int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype fieldattr = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSCALE * scaleWidget = (CDKSCALE *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); scaleWidget = newCDKScale (GCDKSCREEN,xPos,yPos, Title,label, fieldattr,fieldwidth, start,low,high,inc,fastinc, Box,shadow); free (Title); /* Check the return type. */ if (scaleWidget == (CDKSCALE *)NULL) { croak ("Cdk::Scale Could not create widget. Is the window too small?\n"); } else { RETVAL = scaleWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKSCALE * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKScale (object, Keys); free (Keys); } else { value = activateCDKScale (object, NULL); } if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKSCALE * object chtype key = sv2chtype ($arg); CODE: { int value = injectCDKScale (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKSCALE * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSCALE, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSCALE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScalePreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSCALE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScalePostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSCALE * object int Box = sv2int ($arg); CODE: { drawCDKScale (object,Box); } void Erase(object) CDKSCALE * object CODE: { eraseCDKScale(object); } void SetValue(object,value) CDKSCALE * object int value CODE: { setCDKScaleValue (object,value); } void SetLowHigh(object,low,high) CDKSCALE * object int low int high CODE: { setCDKScaleLowHigh (object,low,high); } void SetBox(object,Box=TRUE) CDKSCALE * object int Box = sv2int ($arg); CODE: { setCDKScaleBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSCALE * object char * color CODE: { setCDKScaleBackgroundColor (object,color); } void Register(object) CDKSCALE * object CODE: { registerCDKObject (GCDKSCREEN, vSCALE, object); } void Unregister(object) CDKSCALE * object CODE: { unregisterCDKObject (vSCALE, object); } void Raise(object) CDKSCALE * object CODE: { raiseCDKObject (vSCALE, object); } void Lower(object) CDKSCALE * object CODE: { lowerCDKObject (vSCALE, object); } WINDOW * GetWindow(object) CDKSCALE * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Histogram CDKHISTOGRAM * New(title,height,width,orient=HORIZONTAL,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * title int height int width int orient = sv2int ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKHISTOGRAM * histWidget = (CDKHISTOGRAM *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); histWidget = newCDKHistogram (GCDKSCREEN,xPos,yPos,height,width,orient,Title,Box,shadow); free (Title); /* Check the return type. */ if (histWidget == (CDKHISTOGRAM *)NULL) { croak ("Cdk::Histogram Could not create widget. Is the window too small?\n"); } else { RETVAL = histWidget; } } OUTPUT: RETVAL void SetDisplayType(object,value="vPERCENT") CDKHISTOGRAM * object char * value CODE: { EHistogramDisplayType displayType = vPERCENT; /* Set the stats type. */ if (strEQ (value, "PERCENT")) displayType = vPERCENT; if (strEQ (value, "FRACTION")) displayType = vFRACTION; if (strEQ (value, "REAL")) displayType = vREAL; if (strEQ (value, "NONE")) displayType = vNONE; setCDKHistogramDisplayType (object,displayType); } void SetValue(object,value,low,high) CDKHISTOGRAM * object int value int low int high CODE: { setCDKHistogramValue (object,value,low,high); } void SetFillerChar(object,value) CDKHISTOGRAM * object chtype value = sv2chtype ($arg); CODE: { setCDKHistogramFillerChar (object,value); } void SetStatsPos(object,value) CDKHISTOGRAM * object int value = sv2int ($arg); CODE: { setCDKHistogramStatsPos (object,value); } void SetStatsAttr(object,value) CDKHISTOGRAM * object chtype value = sv2chtype ($arg); CODE: { setCDKHistogramStatsAttr (object,value); } void SetBox(object,Box=TRUE) CDKHISTOGRAM * object int Box = sv2int ($arg); CODE: { setCDKHistogramBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKHISTOGRAM * object char * color CODE: { setCDKHistogramBackgroundColor (object,color); } void Draw(object,Box=TRUE) CDKHISTOGRAM * object int Box = sv2int ($arg); CODE: { drawCDKHistogram (object,Box); } void Erase(object) CDKHISTOGRAM * object CODE: { eraseCDKHistogram (object); } void Register(object) CDKHISTOGRAM * object CODE: { registerCDKObject (GCDKSCREEN, vHISTOGRAM, object); } void Unregister(object) CDKHISTOGRAM * object CODE: { unregisterCDKObject (vHISTOGRAM, object); } void Raise(object) CDKHISTOGRAM * object CODE: { raiseCDKObject (vHISTOGRAM, object); } void Lower(object) CDKHISTOGRAM * object CODE: { lowerCDKObject (vHISTOGRAM, object); } WINDOW * GetWindow(object) CDKHISTOGRAM * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Menu CDKMENU * New(menulist, menuloc, titleattr=A_REVERSE, subtitleattr=A_REVERSE, menuPos=TOP) SV * menulist SV * menuloc chtype titleattr = sv2chtype ($arg); chtype subtitleattr = sv2chtype ($arg); int menuPos = sv2int ($arg); CODE: { const char * menuList[MAX_MENU_ITEMS][MAX_SUB_ITEMS]; int subSize[MAX_SUB_ITEMS]; int * menuLoc; int menulen; int loclen; checkCdkInit(); RETVAL = 0; MAKE_MENU_MATRIX(0, menulist, menuList, subSize, menulen); MAKE_INT_ARRAY (0, menuloc, menuLoc, loclen); if (menulen != loclen) { croak ("Cdk::Menu The menu list and menu location arrays are not the same size."); } RETVAL = newCDKMenu (GCDKSCREEN, menuList, menulen, subSize, menuLoc, menuPos, titleattr, subtitleattr); free (menuLoc); } OUTPUT: RETVAL int Activate(object,...) CDKMENU * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKMenu (object, Keys); free (Keys); } else { value = activateCDKMenu (object, (void *)0); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKMENU * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKMenu (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKMENU * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMENU, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKMENU * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMenuPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKMENU * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMenuPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object, Box) CDKMENU * object int Box = sv2int ($arg); CODE: { drawCDKMenu (object, Box); } void Erase(object) CDKMENU * object CODE: { eraseCDKMenu (object); } void SetCurrentItem(object,menuitem,submenuitem) CDKMENU * object int menuitem int submenuitem CODE: { setCDKMenuCurrentItem(object,menuitem,submenuitem); } void SetTitleHighlight(object,value) CDKMENU * object chtype value CODE: { setCDKMenuTitleHighlight (object,value); } void SetSubTitleHighlight(object,value) CDKMENU * object chtype value CODE: { setCDKMenuSubTitleHighlight (object,value); } void SetBackgroundColor(object,value) CDKMENU * object char * value CODE: { setCDKMenuBackgroundColor (object,value); } void Register(object) CDKMENU * object CODE: { registerCDKObject (GCDKSCREEN, vMENU, object); } void Unregister(object) CDKMENU * object CODE: { unregisterCDKObject (vMENU, object); } void Raise(object) CDKMENU * object CODE: { raiseCDKObject (vMENU, object); } void Lower(object) CDKMENU * object CODE: { lowerCDKObject (vMENU, object); } MODULE = Cdk PACKAGE = Cdk::Entry CDKENTRY * New(title,label,min,max,fieldWidth,filler=".",disptype=vMIXED,xPos=CENTER,yPos=CENTER,fieldattr=A_NORMAL,Box=TRUE,shadow=FALSE) SV * title char * label int min int max int fieldWidth chtype filler = sv2chtype ($arg); int disptype = sv2dtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype fieldattr = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKENTRY * entryWidget = (CDKENTRY *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); entryWidget = newCDKEntry (GCDKSCREEN,xPos,yPos, Title,label, fieldattr,filler,(EDisplayType) disptype, fieldWidth,min,max, Box,shadow); free (Title); /* Check the return type. */ if (entryWidget == (CDKENTRY *)NULL) { croak ("Cdk::Entry Could not create widget. Is the window too small?\n"); } else { RETVAL = entryWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKENTRY * object CODE: { chtype * Keys; int arrayLen; char * value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKEntry (object, Keys); free (Keys); } else { value = activateCDKEntry (object, NULL); } if (object->exitType != vNORMAL) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKENTRY * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKEntry (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKENTRY * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv(functionRef); bindCDKObject (vENTRY, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKEntryPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKEntryPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKENTRY * object int Box = sv2int ($arg); CODE: { drawCDKEntry (object, Box); } void Erase(object) CDKENTRY * object CODE: { eraseCDKEntry (object); } void SetValue(object,value) CDKENTRY * object char * value CODE: { setCDKEntryValue (object, value); } void SetMin(object,value) CDKENTRY * object int value CODE: { setCDKEntryMin (object, value); } void SetMax(object,value) CDKENTRY * object int value CODE: { setCDKEntryMax (object, value); } void SetFillerChar(object,value) CDKENTRY * object chtype value = sv2chtype ($arg); CODE: { setCDKEntryFillerChar (object, value); } void SetHiddenChar(object,value) CDKENTRY * object chtype value = sv2chtype ($arg); CODE: { setCDKEntryHiddenChar (object, value); } void SetBox(object,Box=TRUE) CDKENTRY * object int Box = sv2int ($arg); CODE: { setCDKEntryBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKENTRY * object char * color CODE: { setCDKEntryBackgroundColor (object,color); } char * Get(object) CDKENTRY * object CODE: { RETVAL = getCDKEntryValue (object); } OUTPUT: RETVAL void Clean(object) CDKENTRY * object CODE: { cleanCDKEntry (object); } void Register(object) CDKENTRY * object CODE: { registerCDKObject (GCDKSCREEN, vENTRY, object); } void Unregister(object) CDKENTRY * object CODE: { unregisterCDKObject (vENTRY, object); } void Raise(object) CDKENTRY * object CODE: { raiseCDKObject (vENTRY, object); } void Lower(object) CDKENTRY * object CODE: { lowerCDKObject (vENTRY, object); } WINDOW * GetWindow(object) CDKENTRY * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Mentry CDKMENTRY * New(title,label,min,physical,logical,fieldWidth,disptype=vMIXED,filler=".",xPos=CENTER,yPos=CENTER,fieldattr=A_NORMAL,Box=TRUE,shadow=FALSE) SV * title char * label int min int physical int logical int fieldWidth int disptype = sv2dtype ($arg); chtype filler = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype fieldattr = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKMENTRY * mentryWidget = (CDKMENTRY *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); mentryWidget = newCDKMentry (GCDKSCREEN,xPos,yPos, Title,label, fieldattr,filler, (EDisplayType) disptype,fieldWidth, physical,logical,min, Box,shadow); free (Title); /* Check the return type. */ if (mentryWidget == (CDKMENTRY *)NULL) { croak ("Cdk::Mentry Could not create widget. Is the window too small?\n"); } else { RETVAL = mentryWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKMENTRY * object CODE: { chtype * Keys; int arrayLen; char * value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKMentry (object, Keys); free (Keys); } else { value = activateCDKMentry (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKMENTRY * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKMentry (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKMENTRY * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMENTRY, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKMENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMentryPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKMENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMentryPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKMENTRY * object int Box = sv2int ($arg); CODE: { drawCDKMentry (object,Box); } void Erase(object) CDKMENTRY * object CODE: { eraseCDKMentry (object); } void SetValue(object,value) CDKMENTRY * object char * value CODE: { setCDKMentryValue (object,value); } void SetMin(object,value) CDKMENTRY * object int value CODE: { int min = value; if (value < 0) { min = object->min; } setCDKMentryMin (object,min); } void SetFillerChar(object,value) CDKMENTRY * object chtype value = sv2chtype ($arg); CODE: { setCDKMentryFillerChar (object,value); } void SetBox(object,Box=TRUE) CDKMENTRY * object int Box = sv2int ($arg); CODE: { setCDKMentryBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKMENTRY * object char * color CODE: { setCDKMentryBackgroundColor (object,color); } char * Get(object) CDKMENTRY * object CODE: { RETVAL = object->info; } OUTPUT: RETVAL void Clean(object) CDKMENTRY * object CODE: { cleanCDKMentry (object); } void Register(object) CDKMENTRY * object CODE: { registerCDKObject (GCDKSCREEN, vMENTRY, object); } void Unregister(object) CDKMENTRY * object CODE: { unregisterCDKObject (vMENTRY, object); } void Raise(object) CDKMENTRY * object CODE: { raiseCDKObject (vMENTRY, object); } void Lower(object) CDKMENTRY * object CODE: { lowerCDKObject (vMENTRY, object); } WINDOW * GetWindow(object) CDKMENTRY * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Matrix CDKMATRIX * New(title,rowtitles,coltitles,colwidths,coltypes,vrows,vcols,xPos=CENTER,yPos=CENTER,rowspace=1,colspace=1,filler=".",dominant=NONE,boxMatrix=FALSE,boxCell=TRUE,shadow=FALSE) SV * title SV * rowtitles SV * coltitles SV * colwidths SV * coltypes int vrows int vcols int xPos = sv2int ($arg); int yPos = sv2int ($arg); int rowspace int colspace chtype filler = sv2chtype ($arg); int dominant = sv2int ($arg); int boxMatrix = sv2int ($arg); int boxCell = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKMATRIX * matrixWidget = (CDKMATRIX *)NULL; char ** colTitles; char ** rowTitles; char * Title; int * colWidths; int * colTypes; int rows, cols, widths, dtype; checkCdkInit(); RETVAL = 0; /* Make the arrays. */ MAKE_CHAR_ARRAY (1, rowtitles, rowTitles, rows); MAKE_CHAR_ARRAY (1, coltitles, colTitles, cols); MAKE_INT_ARRAY (1, colwidths, colWidths, widths); MAKE_DTYPE_ARRAY (1, coltypes, colTypes, dtype); MAKE_TITLE (title,Title); /* Now check them... */ if (cols != widths) { croak ("Cdk::Matrix The col title array size is not the same as the widths array size."); } if (cols != dtype) { croak ("Cdk::Matrix The col title array size is not the same as the column value array size."); } if (vrows > rows || vcols > cols) { croak ("Cdk::Matrix The virtual matrix size is larger then the physical size."); } /* OK, everything is ok. Lets make the matrix. */ matrixWidget = newCDKMatrix (GCDKSCREEN, xPos, yPos, rows, cols, vrows, vcols, Title, rowTitles, colTitles, colWidths, colTypes, rowspace, colspace, filler, dominant, boxMatrix, boxCell, shadow); /* Check the return type. */ if (matrixWidget == (CDKMATRIX *)NULL) { croak ("Cdk::Matrix Could not create widget. Is the window too small?\n"); } else { RETVAL = matrixWidget; } free (colTitles); free (rowTitles); free (colWidths); free (colTypes); free (Title); } OUTPUT: RETVAL void Activate(object,...) CDKMATRIX * object PPCODE: { AV * cellInfo = newAV(); chtype * Keys; int x, y, arrayLen; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); (void) activateCDKMatrix (object, Keys); free (Keys); } else { (void) activateCDKMatrix (object, NULL); } /* Check the exit status. */ if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } /* Take the info from the matrix and make an array out of it. */ for (x=1; x <= object->rows; x++) { AV * av = newAV(); for (y=1; y <= object->cols; y++) { char *data = object->info[CELL_INDEX(object,x,y)]; av_push (av, newSVpv (data, strlen (data))); } av_push (cellInfo, newRV((SV *)av)); } /* Push the values on the return stack. */ XPUSHs (sv_2mortal(newSViv(object->rows))); XPUSHs (sv_2mortal(newSViv(object->cols))); XPUSHs (sv_2mortal(newRV((SV*)cellInfo))); } int Inject(object,key) CDKMATRIX * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKMatrix (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKMATRIX * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMATRIX, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKMATRIX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMatrixPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKMATRIX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMatrixPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void GetDim(object) CDKMATRIX * object PPCODE: { XPUSHs (sv_2mortal(newSViv(object->rows))); XPUSHs (sv_2mortal(newSViv(object->cols))); } void Draw(object,Box=TRUE) CDKMATRIX * object int Box = sv2int ($arg); CODE: { drawCDKMatrix (object,Box); } void Erase(object) CDKMATRIX * object CODE: { eraseCDKMatrix (object); } void Set(object,info) CDKMATRIX * object SV * info CODE: { char ** Info; int * subSize; int matrixlen; int width = 1; AV *array = (AV *)SvRV(info); int x, y; matrixlen = av_len (array) + 1; subSize = (int *)calloc((size_t)matrixlen + 2, sizeof(int)); if (subSize != 0) { for (x = 1; x <= matrixlen; x++) { SV *name = *av_fetch(array, x - 1, FALSE); AV *subArray = (AV *)SvRV(name); int subLen = av_len (subArray) + 1; width = MAXIMUM(width, subLen); } Info = (char **)calloc((size_t)((width + 1) * (matrixlen + 1)), sizeof(char *)); if (Info != 0) { for (x = 1; x <= matrixlen; x++) { SV *name = *av_fetch(array, x - 1, FALSE); AV *subArray = (AV *)SvRV(name); int subLen = av_len (subArray) + 1; subSize[x] = subLen; for (y=1; y <= subLen; y++) { SV *sv = *av_fetch(subArray, y - 1, FALSE); Info[x * (matrixlen + 1) + y] = copyChar((char *)SvPV(sv,PL_na)); } } setCDKMatrixCells (object, Info, matrixlen, width, subSize); free (Info); } free (subSize); } } void SetCell(object,row,col,value) CDKMATRIX * object int row int col char * value CODE: { setCDKMatrixCell (object,row,col,value); } char * GetCell(object,row,col) CDKMATRIX * object int row int col CODE: { RETVAL = getCDKMatrixCell (object,row,col); } OUTPUT: RETVAL int GetRow(object) CDKMATRIX * object CODE: { RETVAL = getCDKMatrixRow (object); } OUTPUT: RETVAL int GetCol(object) CDKMATRIX * object CODE: { RETVAL = getCDKMatrixCol (object); } OUTPUT: RETVAL void SetBoxAttribute(object,Box=TRUE) CDKMATRIX * object int Box = sv2int ($arg); CODE: { setCDKMatrixBoxAttribute (object, (chtype)Box); } void SetULChar(object,character=ACS_ULCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixHorizontalChar (object,character); } void SetBackgroundColor(object,color) CDKMATRIX * object char * color CODE: { setCDKMatrixBackgroundColor (object,color); } void Clean(object) CDKMATRIX * object CODE: { cleanCDKMatrix (object); } void Raise(object) CDKMATRIX * object CODE: { raiseCDKObject (vMATRIX, object); } void Lower(object) CDKMATRIX * object CODE: { lowerCDKObject (vMATRIX, object); } WINDOW * GetWindow(object) CDKMATRIX * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL void Register(object) CDKMATRIX * object CODE: { registerCDKObject (GCDKSCREEN, vMATRIX, object); } void Unregister(object) CDKMATRIX * object CODE: { unregisterCDKObject (vMATRIX, object); } MODULE = Cdk PACKAGE = Cdk::Marquee CDKMARQUEE * New(width,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKMARQUEE * marqueeWidget = (CDKMARQUEE *)NULL; checkCdkInit(); RETVAL = 0; marqueeWidget = newCDKMarquee (GCDKSCREEN,xPos,yPos,width,Box,shadow); /* Check the return type. */ if (marqueeWidget == (CDKMARQUEE *)NULL) { croak ("Cdk::Marquee Could not create widget. Is the window too small?\n"); } else { RETVAL = marqueeWidget; } } OUTPUT: RETVAL int Activate(object,message,delay,repeat,Box=TRUE) CDKMARQUEE * object char * message int delay int repeat int Box = sv2int ($arg); CODE: { RETVAL = activateCDKMarquee (object,message,delay,repeat,Box); } OUTPUT: RETVAL void Deactivate(object) CDKMARQUEE * object CODE: { deactivateCDKMarquee (object); } void SetBoxAttribute(object,Box=TRUE) CDKMARQUEE * object int Box = sv2int ($arg); CODE: { setCDKMarqueeBoxAttribute (object, (chtype)Box); } void SetULChar(object,character=ACS_ULCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeHorizontalChar (object,character); } void SetBackgroundColor(object,color) CDKMARQUEE * object char * color CODE: { setCDKMarqueeBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKMARQUEE * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMARQUEE, object, key, PerlBindCB, function); } void Draw(object,Box=TRUE) CDKMARQUEE * object int Box = sv2int ($arg); CODE: { drawCDKMarquee (object,Box); } void Erase(object) CDKMARQUEE * object CODE: { eraseCDKMarquee (object); } void Register(object) CDKMARQUEE * object CODE: { registerCDKObject (GCDKSCREEN, vMARQUEE, object); } void Unregister(object) CDKMARQUEE * object CODE: { unregisterCDKObject (vMARQUEE, object); } void Raise(object) CDKMARQUEE * object CODE: { raiseCDKObject (vMARQUEE, object); } void Lower(object) CDKMARQUEE * object CODE: { lowerCDKObject (vMARQUEE, object); } WINDOW * GetWindow(object) CDKMARQUEE * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Selection CDKSELECTION * New(title,list,choices,height,width,xPos=CENTER,yPos=CENTER,sPos=RIGHT,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * list SV * choices int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int sPos = sv2int ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSELECTION * selectionWidget = (CDKSELECTION *)NULL; char ** List; char ** Choices; char * Title; int listSize, choiceSize; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY(0, list, List, listSize); MAKE_CHAR_ARRAY(0, choices, Choices, choiceSize); MAKE_TITLE (title,Title); selectionWidget = newCDKSelection (GCDKSCREEN, xPos, yPos, sPos, height, width, Title, List, listSize, Choices, choiceSize, highlight, Box, shadow); free (List); free (Choices); free (Title); /* Check the return type. */ if (selectionWidget == (CDKSELECTION *)NULL) { croak ("Cdk::Selection Could not create widget. Is the window too small?\n"); } else { RETVAL = selectionWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKSELECTION * object PPCODE: { chtype * Keys; int arrayLen; int x; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); (void) activateCDKSelection (object, Keys); free (Keys); } else { (void) activateCDKSelection (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } /* Push the values on the return stack. */ for (x=0; x < object->listSize ; x++) { XPUSHs (sv_2mortal(newSViv(object->selections[x]))); } } int Inject(object,key) CDKSELECTION * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKSelection (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKSELECTION * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSELECTION, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSELECTION * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSelectionPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSELECTION * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSelectionPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSELECTION * object int Box = sv2int ($arg); CODE: { drawCDKSelection (object,Box); } void Erase(object) CDKSELECTION * object CODE: { eraseCDKSelection (object); } void SetHighlight(object,highlight) CDKSELECTION * object chtype highlight = sv2chtype ($arg); CODE: { setCDKSelectionHighlight (object,highlight); } void SetChoices(object,choices) CDKSELECTION * object SV * choices CODE: { int * defaultChoices; int choiceLength; MAKE_INT_ARRAY (0, choices, defaultChoices, choiceLength); setCDKSelectionChoices (object,defaultChoices); free (defaultChoices); } void SetChoice(object,choice,cIndex) CDKSELECTION * object int choice int cIndex CODE: { setCDKSelectionChoice (object,cIndex,choice); } void SetModes(object,modes) CDKSELECTION * object SV * modes CODE: { int * Modes; int modeLength; MAKE_INT_ARRAY (0, modes, Modes, modeLength); setCDKSelectionModes (object,Modes); free (Modes); } void SetMode(object,mode,cIndex) CDKSELECTION * object int mode int cIndex CODE: { setCDKSelectionMode (object,cIndex,mode); } void SetBox(object,Box=TRUE) CDKSELECTION * object int Box = sv2int ($arg); CODE: { setCDKSelectionBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSELECTION * object char * color CODE: { setCDKSelectionBackgroundColor (object,color); } void Register(object) CDKSELECTION * object CODE: { registerCDKObject (GCDKSCREEN, vSELECTION, object); } void Unregister(object) CDKSELECTION * object CODE: { unregisterCDKObject (vSELECTION, object); } void Raise(object) CDKSELECTION * object CODE: { raiseCDKObject (vSELECTION, object); } void Lower(object) CDKSELECTION * object CODE: { lowerCDKObject (vSELECTION, object); } WINDOW * GetWindow(object) CDKSELECTION * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Viewer CDKVIEWER * New(buttons,height,width,buttonHighlight=A_REVERSE,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * buttons int height int width chtype buttonHighlight = sv2chtype ($arg); int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKVIEWER * viewerWidget = (CDKVIEWER *)NULL; char ** Buttons; int buttonCount; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, buttons, Buttons, buttonCount); viewerWidget = newCDKViewer (GCDKSCREEN, xpos, ypos, height, width, Buttons, buttonCount, buttonHighlight, Box, shadow); free (Buttons); /* Check the return type. */ if (viewerWidget == (CDKVIEWER *)NULL) { croak ("Cdk::Viewer Could not create widget. Is the window too small?\n"); } else { RETVAL = viewerWidget; } } OUTPUT: RETVAL int Activate(object) CDKVIEWER * object CODE: { int value = activateCDKViewer (object, (chtype *)NULL); if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetInfo(object,info,interpret=TRUE) CDKVIEWER * object SV * info int interpret = sv2int ($arg); CODE: { char ** Info; int infolen; MAKE_CHAR_ARRAY(0, info, Info, infolen); setCDKViewerInfo (object, Info, infolen, interpret); free (Info); } void SetTitle(object,value) CDKVIEWER * object char * value CODE: { setCDKViewerTitle (object,value); } void SetHighlight(object,value) CDKVIEWER * object chtype value CODE: { setCDKViewerHighlight (object,value); } void SetInfoLine(object,value) CDKVIEWER * object int value CODE: { setCDKViewerInfoLine (object,value); } void SetBox(object,Box=TRUE) CDKVIEWER * object int Box = sv2int ($arg); CODE: { setCDKViewerBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKVIEWER * object char * color CODE: { setCDKViewerBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKVIEWER * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vVIEWER, object, key, PerlBindCB, function); } void Draw(object,Box=TRUE) CDKVIEWER * object int Box = sv2int ($arg); CODE: { drawCDKViewer (object,Box); } void Erase(object) CDKVIEWER * object CODE: { eraseCDKViewer (object); } void Register(object) CDKVIEWER * object CODE: { registerCDKObject (GCDKSCREEN, vVIEWER, object); } void Unregister(object) CDKVIEWER * object CODE: { unregisterCDKObject (vVIEWER, object); } void Raise(object) CDKVIEWER * object CODE: { raiseCDKObject (vVIEWER, object); } void Lower(object) CDKVIEWER * object CODE: { lowerCDKObject (vVIEWER, object); } WINDOW * GetWindow(object) CDKVIEWER * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Graph CDKGRAPH * New(title,xtitle,ytitle,height,width,xpos=CENTER,ypos=CENTER) SV * title char * xtitle char * ytitle int height int width int xpos = sv2int ($arg); int ypos = sv2int ($arg); CODE: { CDKGRAPH * graphWidget = (CDKGRAPH *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); graphWidget = newCDKGraph (GCDKSCREEN,xpos,ypos,height,width,Title,xtitle,ytitle); free (Title); /* Check the return type. */ if (graphWidget == (CDKGRAPH *)NULL) { croak ("Cdk::Graph Could not create widget. Is the window too small?\n"); } else { RETVAL = graphWidget; } } OUTPUT: RETVAL int SetValues(object,values,startAtZero=TRUE) CDKGRAPH * object SV * values int startAtZero = sv2int ($arg); CODE: { int * Values; int valueCount; MAKE_INT_ARRAY (0, values, Values, valueCount); RETVAL = setCDKGraphValues (object,Values,valueCount,startAtZero); free (Values); } OUTPUT: RETVAL void SetCharacters(object,value) CDKGRAPH * object char * value CODE: { setCDKGraphCharacters (object,value); } void SetDisplayType(object,value) CDKGRAPH * object char * value CODE: { EGraphDisplayType displayType = vLINE; if (strEQ (value, "PLOT")) { displayType = vPLOT; } setCDKGraphDisplayType (object,displayType); } void SetBox(object,Box=FALSE) CDKGRAPH * object int Box = sv2int ($arg); CODE: { setCDKGraphBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKGRAPH * object char * color CODE: { setCDKGraphBackgroundColor (object,color); } void Draw(object,Box=FALSE) CDKGRAPH * object int Box = sv2int ($arg); CODE: { drawCDKGraph (object,Box); } void Erase(object) CDKGRAPH * object CODE: { eraseCDKGraph (object); } void Register(object) CDKGRAPH * object CODE: { registerCDKObject (GCDKSCREEN, vGRAPH, object); } void Unregister(object) CDKGRAPH * object CODE: { unregisterCDKObject (vGRAPH, object); } void Raise(object) CDKGRAPH * object CODE: { raiseCDKObject (vGRAPH, object); } void Lower(object) CDKGRAPH * object CODE: { lowerCDKObject (vGRAPH, object); } WINDOW * GetWindow(object) CDKGRAPH * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Radio CDKRADIO * New(title,list,height,width,xPos=CENTER,yPos=CENTER,sPos=RIGHT,choice="X",defaultItem=0,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * list int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int sPos = sv2int ($arg); chtype choice = sv2chtype ($arg); int defaultItem chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKRADIO * radioWidget = (CDKRADIO *)NULL; char ** List; char * Title; int listlen; MAKE_CHAR_ARRAY(0, list, List, listlen); MAKE_TITLE (title,Title); radioWidget = newCDKRadio (GCDKSCREEN,xPos,yPos,sPos, height,width,Title, List,listlen, choice,defaultItem, highlight,Box,shadow); free (List); free (Title); /* Check the return type. */ if (radioWidget == (CDKRADIO *)NULL) { croak ("Cdk::Radio Could not create widget. Is the window too small?\n"); } else { RETVAL = radioWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKRADIO * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKRadio (object, Keys); free (Keys); } else { value = activateCDKRadio (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKRADIO * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKRadio (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKRADIO * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vRADIO, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKRADIO * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKRadioPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKRADIO * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKRadioPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKRADIO * object int Box = sv2int ($arg); CODE: { drawCDKRadio (object,Box); } void Erase(object) CDKRADIO * object CODE: { eraseCDKRadio (object); } void SetHighlight(object,highlight) CDKRADIO * object chtype highlight = sv2chtype ($arg); CODE: { setCDKRadioHighlight (object,highlight); } void SetChoiceCharacter(object,value) CDKRADIO * object chtype value = sv2chtype ($arg); CODE: { setCDKRadioChoiceCharacter (object,value); } void SetLeftBrace(object,value) CDKRADIO * object chtype value = sv2chtype ($arg); CODE: { setCDKRadioLeftBrace (object,value); } void SetRightBrace(object,value) CDKRADIO * object chtype value = sv2chtype ($arg); CODE: { setCDKRadioRightBrace (object,value); } void SetBox(object,Box=TRUE) CDKRADIO * object int Box = sv2int ($arg); CODE: { setCDKRadioBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKRADIO * object char * color CODE: { setCDKRadioBackgroundColor (object,color); } void Register(object) CDKRADIO * object CODE: { registerCDKObject (GCDKSCREEN, vRADIO, object); } void Unregister(object) CDKRADIO * object CODE: { unregisterCDKObject (vRADIO, object); } void Raise(object) CDKRADIO * object CODE: { raiseCDKObject (vRADIO, object); } void Lower(object) CDKRADIO * object CODE: { lowerCDKObject (vRADIO, object); } WINDOW * GetWindow(object) CDKRADIO * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Template CDKTEMPLATE * New(title,label,plate,cOverlay,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * title char * label char * plate char * cOverlay int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKTEMPLATE * templateWidget = (CDKTEMPLATE *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); templateWidget = newCDKTemplate (GCDKSCREEN,xpos,ypos, Title,label, plate,cOverlay, Box,shadow); free (Title); /* Check the return type. */ if (templateWidget == (CDKTEMPLATE *)NULL) { croak ("Cdk::Template Could not create widget. Is the window too small?\n"); } else { RETVAL = templateWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKTEMPLATE * object CODE: { chtype * Keys; int arrayLen; char *value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKTemplate (object, Keys); free (Keys); } else { value = activateCDKTemplate (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKTEMPLATE * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKTemplate (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKTEMPLATE * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vTEMPLATE, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKTEMPLATE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKTemplatePreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKTEMPLATE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKTemplatePostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL char * Mix(object) CDKTEMPLATE * object CODE: { RETVAL = mixCDKTemplate (object); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKTEMPLATE * object int Box = sv2int ($arg); CODE: { drawCDKTemplate (object, Box); } void Erase(object) CDKTEMPLATE * object CODE: { eraseCDKTemplate (object); } void SetValue(object,value) CDKTEMPLATE * object char * value CODE: { setCDKTemplateValue (object,value); } void SetMin(object,value) CDKTEMPLATE * object int value CODE: { setCDKTemplateMin (object,value); } void SetBox(object,Box=TRUE) CDKTEMPLATE * object int Box = sv2int ($arg); CODE: { setCDKTemplateBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKTEMPLATE * object char * color CODE: { setCDKTemplateBackgroundColor (object,color); } char * Get(object) CDKTEMPLATE * object CODE: { RETVAL = object->info; } OUTPUT: RETVAL void Clean(object) CDKTEMPLATE * object CODE: { cleanCDKTemplate (object); } void Register(object) CDKTEMPLATE * object CODE: { registerCDKObject (GCDKSCREEN, vTEMPLATE, object); } void Unregister(object) CDKTEMPLATE * object CODE: { unregisterCDKObject (vTEMPLATE, object); } void Raise(object) CDKTEMPLATE * object CODE: { raiseCDKObject (vTEMPLATE, object); } void Lower(object) CDKTEMPLATE * object CODE: { lowerCDKObject (vTEMPLATE, object); } WINDOW * GetWindow(object) CDKTEMPLATE * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Swindow CDKSWINDOW * New(title,savelines,height,width,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * title int savelines int height int width int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSWINDOW * swindowWidget = (CDKSWINDOW *)NULL; char * Title; MAKE_TITLE (title,Title); swindowWidget = newCDKSwindow (GCDKSCREEN,xpos,ypos, height,width, Title,savelines, Box,shadow); free (Title); /* Check the return type. */ if (swindowWidget == (CDKSWINDOW *)NULL) { croak ("Cdk::Swindow Could not create widget. Is the window too small?\n"); } else { RETVAL = swindowWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKSWINDOW * object CODE: { chtype * Keys; int arrayLen; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); activateCDKSwindow (object, Keys); free (Keys); } else { activateCDKSwindow (object, NULL); } } int Inject(object,key) CDKSWINDOW * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKSwindow (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKSWINDOW * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSWINDOW, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSWINDOW * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSwindowPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSWINDOW * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSwindowPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void SetContents(object,info) CDKSWINDOW * object SV * info CODE: { char ** Loginfo; int infolen; MAKE_CHAR_ARRAY(0, info, Loginfo, infolen); setCDKSwindowContents (object, Loginfo, infolen); free (Loginfo); } void SetBox(object,Box=TRUE) CDKSWINDOW * object int Box = sv2int ($arg); CODE: { setCDKSwindowBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSWINDOW * object char * color CODE: { setCDKSwindowBackgroundColor (object,color); } void Addline(object,info,insertpos) CDKSWINDOW * object char * info int insertpos = sv2int ($arg); CODE: { addCDKSwindow (object, info, insertpos); } void Trim(object,start,finish) CDKSWINDOW * object int start = sv2int ($arg); int finish = sv2int ($arg); CODE: { trimCDKSwindow (object, start, finish); } int Exec(object,command,insertPos=BOTTOM) CDKSWINDOW * object char * command int insertPos = sv2int ($arg); CODE: { RETVAL = execCDKSwindow (object, command, insertPos); } OUTPUT: RETVAL void Get(object) CDKSWINDOW * object PPCODE: { int x; char *temp; /* Push each item onto the stack. */ for (x=0; x < object->listSize ; x++) { /* We need to convert from chtype to char */ temp = chtype2Char (object->list[x]); /* Push it on the stack. */ XPUSHs (sv_2mortal(newSVpv(temp, strlen(temp)))); freeChar (temp); } } void Save(object) CDKSWINDOW * object CODE: { saveCDKSwindowInformation (object); } void Load(object) CDKSWINDOW * object CODE: { loadCDKSwindowInformation (object); } int Dump(object,filename) CDKSWINDOW * object char * filename CODE: { RETVAL = dumpCDKSwindow (object, filename); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSWINDOW * object int Box = sv2int ($arg); CODE: { drawCDKSwindow (object, Box); } void Erase(object) CDKSWINDOW * object CODE: { eraseCDKSwindow (object); } void Clean(object) CDKSWINDOW * object CODE: { cleanCDKSwindow (object); } void Register(object) CDKSWINDOW * object CODE: { registerCDKObject (GCDKSCREEN, vSWINDOW, object); } void Unregister(object) CDKSWINDOW * object CODE: { unregisterCDKObject (vSWINDOW, object); } void Raise(object) CDKSWINDOW * object CODE: { raiseCDKObject (vSWINDOW, object); } void Lower(object) CDKSWINDOW * object CODE: { lowerCDKObject (vSWINDOW, object); } WINDOW * GetWindow(object) CDKSWINDOW * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Itemlist CDKITEMLIST * New(title,label,itemlist,defaultItem=0,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * title char * label SV * itemlist int defaultItem int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKITEMLIST * itemlistWidget = (CDKITEMLIST *)NULL; char * Title; char ** Itemlist; int itemLength; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, itemlist, Itemlist, itemLength); MAKE_TITLE (title,Title); itemlistWidget = newCDKItemlist (GCDKSCREEN,xpos,ypos, Title,label, Itemlist,itemLength, defaultItem,Box,shadow); free (Itemlist); free (Title); /* Check the return type. */ if (itemlistWidget == (CDKITEMLIST *)NULL) { croak ("Cdk::Itemlist Could not create widget. Is the window too small?\n"); } else { RETVAL = itemlistWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKITEMLIST * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKItemlist (object, Keys); free (Keys); } else { value = activateCDKItemlist (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKITEMLIST * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKItemlist (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKITEMLIST * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vITEMLIST, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKITEMLIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKItemlistPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKITEMLIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKItemlistPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void SetValues(object,values) CDKITEMLIST * object SV * values CODE: { char ** Values; int valueLength; MAKE_CHAR_ARRAY(0, values, Values, valueLength); setCDKItemlistValues (object, Values, valueLength, object->defaultItem); free (Values); } void SetDefaultItem(object,value) CDKITEMLIST * object int value CODE: { setCDKItemlistDefaultItem (object,value); } void SetCurrentItem(object,value) CDKITEMLIST * object int value CODE: { setCDKItemlistCurrentItem (object,value); } void SetBox(object,Box=TRUE) CDKITEMLIST * object int Box = sv2int ($arg); CODE: { setCDKItemlistBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKITEMLIST * object char * color CODE: { setCDKItemlistBackgroundColor (object,color); } char * Get(object) CDKITEMLIST * object CODE: { RETVAL = chtype2Char (object->item[object->currentItem]); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKITEMLIST * object int Box = sv2int ($arg); CODE: { drawCDKItemlist (object,Box); } void Erase(object) CDKITEMLIST * object CODE: { eraseCDKItemlist (object); } void Register(object) CDKITEMLIST * object CODE: { registerCDKObject (GCDKSCREEN,vITEMLIST,object); } void Unregister(object) CDKITEMLIST * object CODE: { unregisterCDKObject (vITEMLIST, object); } void Raise(object) CDKITEMLIST * object CODE: { raiseCDKObject (vITEMLIST, object); } void Lower(object) CDKITEMLIST * object CODE: { lowerCDKObject (vITEMLIST, object); } WINDOW * GetWindow(object) CDKITEMLIST * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Fselect CDKFSELECT * New(title,label,height,width,dAttrib="",fAttrib="",lAttrib="",sAttrib="",highlight="",fieldAttribute=A_NORMAL,filler=".",xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * title char * label int height int width char * dAttrib char * fAttrib char * lAttrib char * sAttrib chtype highlight = sv2chtype ($arg); chtype fieldAttribute = sv2chtype ($arg); chtype filler = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKFSELECT * fselectWidget = (CDKFSELECT *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); fselectWidget = newCDKFselect (GCDKSCREEN,xPos,yPos, height,width, Title,label, fieldAttribute,filler,highlight, dAttrib,fAttrib,lAttrib,sAttrib, Box,shadow); free (Title); /* Check the return type. */ if (fselectWidget == (CDKFSELECT *)NULL) { croak ("Cdk::Fselect Could not create widget. Is the window too small?\n"); } else { RETVAL = fselectWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKFSELECT * object CODE: { chtype * Keys; int arrayLen; char *value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKFselect (object, Keys); free (Keys); } else { value = activateCDKFselect (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKFSELECT * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKFselect (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetDirectory(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectDirectory (object,value); } void SetFillerChar(object,value) CDKFSELECT * object chtype value CODE: { setCDKFselectFillerChar (object,value); } void SetHighlight(object,value) CDKFSELECT * object chtype value CODE: { setCDKFselectHighlight (object,value); } void SetDirAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectDirAttribute (object,value); } void SetLinkAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectLinkAttribute (object,value); } void SetFileAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectFileAttribute (object,value); } void SetSocketkAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectSocketAttribute (object,value); } void SetBox(object,Box=TRUE) CDKFSELECT * object int Box = sv2int ($arg); CODE: { setCDKFselectBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKFSELECT * object char * color CODE: { setCDKFselectBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKFSELECT * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vFSELECT, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKFSELECT * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKFselectPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKFSELECT * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKFselectPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKFSELECT * object int Box = sv2int ($arg); CODE: { drawCDKFselect (object,Box); } void Erase(object) CDKFSELECT * object CODE: { eraseCDKFselect (object); } void Register(object) CDKFSELECT * object CODE: { registerCDKObject (GCDKSCREEN,vFSELECT,object); } void Unregister(object) CDKFSELECT * object CODE: { unregisterCDKObject (vFSELECT, object); } void Raise(object) CDKFSELECT * object CODE: { raiseCDKObject (vFSELECT, object); } void Lower(object) CDKFSELECT * object CODE: { lowerCDKObject (vFSELECT, object); } WINDOW * GetWindow(object) CDKFSELECT * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Slider CDKSLIDER * New(title,label,start,low,high,inc,fastInc,fieldWidth,xPos,yPos,filler,Box,shadow) SV * title char * label int start int low int high int inc int fastInc int fieldWidth int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype filler = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSLIDER * sliderWidget = (CDKSLIDER *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); sliderWidget = newCDKSlider (GCDKSCREEN, xPos,yPos, Title, label, filler,fieldWidth, start,low,high, inc,fastInc, Box,shadow); free (Title); /* Check the return type. */ if (sliderWidget == (CDKSLIDER *)NULL) { croak ("Cdk::Slider Could not create widget. Is the window too small?\n"); } else { RETVAL = sliderWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKSLIDER * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKSlider (object, Keys); free (Keys); } else { value = activateCDKSlider (object, (chtype *)NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKSLIDER * object chtype key = sv2chtype ($arg); CODE: { int value = injectCDKSlider (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetValue(object,value) CDKSLIDER* object int value CODE: { setCDKSliderValue (object,value); } void SetLowHigh(object,low,high) CDKSLIDER * object int low int high CODE: { setCDKSliderLowHigh (object,low,high); } void SetBox(object,Box=TRUE) CDKSLIDER * object int Box = sv2int ($arg); CODE: { setCDKSliderBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSLIDER * object char * color CODE: { setCDKSliderBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKSLIDER * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSLIDER, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSLIDER * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSliderPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSLIDER * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSliderPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSLIDER * object int Box = sv2int ($arg); CODE: { drawCDKSlider (object,Box); } void Erase(object) CDKSLIDER * object CODE: { eraseCDKSlider (object); } void Register(object) CDKSLIDER * object CODE: { registerCDKObject (GCDKSCREEN,vSLIDER,object); } void Unregister(object) CDKSLIDER * object CODE: { unregisterCDKObject (vSLIDER, object); } void Raise(object) CDKSLIDER * object CODE: { raiseCDKObject (vSLIDER, object); } void Lower(object) CDKSLIDER * object CODE: { lowerCDKObject (vSLIDER, object); } WINDOW * GetWindow(object) CDKSLIDER * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Alphalist CDKALPHALIST * New(title,label,list,height,width,xPos,yPos,highlight,filler,Box,shadow) SV * title char * label SV * list int height int width chtype highlight = sv2chtype ($arg); chtype filler = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKALPHALIST * alphalistWidget = (CDKALPHALIST *)NULL; char ** List; char * Title; int listSize; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY(0, list, List, listSize); MAKE_TITLE (title,Title); alphalistWidget = newCDKAlphalist (GCDKSCREEN,xPos,yPos, height,width, Title,label, List,listSize, filler,highlight, Box,shadow); free (List); free (Title); /* Check the return type. */ if (alphalistWidget == (CDKALPHALIST *)NULL) { croak ("Cdk::Alphalist Could not create widget. Is the window too small?\n"); } else { RETVAL = alphalistWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKALPHALIST * object PPCODE: { SV *sv = (SV *)&PL_sv_undef; chtype * Keys; int arrayLen; char *value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKAlphalist (object, Keys); free (Keys); } else { value = activateCDKAlphalist (object, NULL); } if (object->exitType == vNORMAL) { sv = newSVpv (value, strlen (value)); } XPUSHs (sv); } char * Inject(object,key) CDKALPHALIST * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKAlphalist (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetContents(object,list) CDKALPHALIST* object SV * list CODE: { char ** List; int listSize; MAKE_CHAR_ARRAY(0, list, List, listSize); setCDKAlphalistContents (object, List, listSize); free (List); } void SetFillerChar(object,filler) CDKALPHALIST* object chtype filler = sv2chtype ($arg); CODE: { setCDKAlphalistFillerChar (object,filler); } void SetHighlight(object,highlight) CDKALPHALIST* object chtype highlight = sv2chtype ($arg); CODE: { setCDKAlphalistHighlight (object,highlight); } void SetBox(object,Box=TRUE) CDKALPHALIST * object int Box = sv2int ($arg); CODE: { setCDKAlphalistBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKALPHALIST * object char * color CODE: { setCDKAlphalistBackgroundColor (object,color); } char * Get(object) CDKALPHALIST * object CODE: { RETVAL = object->entryField->info; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKALPHALIST * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vALPHALIST, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKALPHALIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKAlphalistPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKALPHALIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKAlphalistPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKALPHALIST * object int Box = sv2int ($arg); CODE: { drawCDKAlphalist (object,Box); } void Erase(object) CDKALPHALIST * object CODE: { eraseCDKAlphalist (object); } void Register(object) CDKALPHALIST * object CODE: { registerCDKObject (GCDKSCREEN,vALPHALIST,object); } void Unregister(object) CDKALPHALIST * object CODE: { unregisterCDKObject (vALPHALIST, object); } void Raise(object) CDKALPHALIST * object CODE: { raiseCDKObject (vALPHALIST, object); } void Lower(object) CDKALPHALIST * object CODE: { lowerCDKObject (vALPHALIST, object); } WINDOW * GetWindow(object) CDKALPHALIST * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Calendar CDKCALENDAR * New(title,day,month,year,dayAttrib,monthAttrib,yearAttrib,highlight,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * title int day int month int year chtype dayAttrib = sv2chtype ($arg); chtype monthAttrib = sv2chtype ($arg); chtype yearAttrib = sv2chtype ($arg); chtype highlight = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKCALENDAR * calendarWidget = (CDKCALENDAR *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); calendarWidget = newCDKCalendar (GCDKSCREEN,xPos,yPos,Title, day,month,year, dayAttrib,monthAttrib,yearAttrib, highlight,Box,shadow); free (Title); /* Check the return type. */ if (calendarWidget == (CDKCALENDAR *)NULL) { croak ("Cdk::Calendar Could not create widget. Is the window too small?\n"); } else { RETVAL = calendarWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKCALENDAR * object PPCODE: { chtype * Keys; int arrayLen; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); activateCDKCalendar (object, Keys); free (Keys); } else { activateCDKCalendar (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } XPUSHs (sv_2mortal(newSViv(object->day))); XPUSHs (sv_2mortal(newSViv(object->month))); XPUSHs (sv_2mortal(newSViv(object->year))); } void Inject(object,key) CDKCALENDAR * object chtype key = sv2chtype ($arg); PPCODE: { (void) injectCDKCalendar (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } XPUSHs (sv_2mortal(newSViv(object->day))); XPUSHs (sv_2mortal(newSViv(object->month))); XPUSHs (sv_2mortal(newSViv(object->year))); } void SetDate(object,day,month,year) CDKCALENDAR * object int day int month int year CODE: { setCDKCalendarDate (object,day,month,year); } void GetDate(object) CDKCALENDAR * object PPCODE: { XPUSHs (sv_2mortal(newSViv(object->day))); XPUSHs (sv_2mortal(newSViv(object->month))); XPUSHs (sv_2mortal(newSViv(object->year))); } void SetMarker(object,day,month,year,marker) CDKCALENDAR * object int day int month int year chtype marker = sv2chtype ($arg); CODE: { setCDKCalendarMarker (object,day,month,year,marker); } void RemoveMarker(object,day,month,year) CDKCALENDAR * object int day int month int year CODE: { removeCDKCalendarMarker (object,day,month,year); } void SetDayAttribute(object,attribute) CDKCALENDAR * object chtype attribute = sv2chtype ($arg); CODE: { setCDKCalendarDayAttribute (object, attribute); } void Bind(object,key,functionRef) CDKCALENDAR * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vCALENDAR, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKCALENDAR * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKCalendarPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKCALENDAR * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKCalendarPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKCALENDAR * object int Box = sv2int ($arg); CODE: { drawCDKCalendar (object,Box); } void Erase(object) CDKCALENDAR * object CODE: { eraseCDKCalendar(object); } void Set(object,year,month,day,yearAttrib,monthAttrib,dayAttrib,highlight,Box) CDKCALENDAR * object int day int month int year chtype dayAttrib = sv2chtype ($arg); chtype monthAttrib = sv2chtype ($arg); chtype yearAttrib = sv2chtype ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); CODE: { setCDKCalendar (object,day,month,year,yearAttrib,monthAttrib,dayAttrib,highlight,Box); } void Register(object) CDKCALENDAR * object CODE: { registerCDKObject (GCDKSCREEN, vCALENDAR, object); } void Unregister(object) CDKCALENDAR * object CODE: { unregisterCDKObject (vCALENDAR, object); } void Raise(object) CDKCALENDAR * object CODE: { raiseCDKObject (vCALENDAR, object); } void Lower(object) CDKCALENDAR * object CODE: { lowerCDKObject (vCALENDAR, object); } WINDOW * GetWindow(object) CDKCALENDAR * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Buttonbox CDKBUTTONBOX * New(title,buttons,rows,cols,height,width,xPos=CENTER,yPos=CENTER,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * buttons int rows int cols int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKBUTTONBOX * widget = (CDKBUTTONBOX *)NULL; char ** Buttons; char * Title; int buttonCount; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, buttons, Buttons, buttonCount); MAKE_TITLE (title,Title); widget = newCDKButtonbox (GCDKSCREEN, xPos, yPos, height, width, Title, rows, cols, Buttons, buttonCount, highlight, Box, shadow); free (Buttons); free (Title); /* Check the return type. */ if (widget == (CDKBUTTONBOX *)NULL) { croak ("Cdk::Buttonbox Could not create widget. Is the window too small?\n"); } else { RETVAL = widget; } } OUTPUT: RETVAL int Activate(object,...) CDKBUTTONBOX * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKButtonbox (object, Keys); free (Keys); } else { value = activateCDKButtonbox (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKBUTTONBOX * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKButtonbox (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKBUTTONBOX * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vBUTTONBOX, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKBUTTONBOX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKButtonboxPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKBUTTONBOX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKButtonboxPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKBUTTONBOX * object int Box = sv2int ($arg); CODE: { drawCDKButtonbox (object,Box); } void Erase(object) CDKBUTTONBOX * object CODE: { eraseCDKButtonbox (object); } void SetHighlight(object,highlight=A_REVERSE) CDKBUTTONBOX * object chtype highlight = sv2chtype ($arg); CODE: { setCDKButtonboxHighlight (object,highlight); } void SetBox(object,Box=TRUE) CDKBUTTONBOX * object int Box = sv2int ($arg); CODE: { setCDKButtonboxBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKBUTTONBOX * object char * color CODE: { setCDKButtonboxBackgroundColor (object,color); } void Register(object) CDKBUTTONBOX * object CODE: { registerCDKObject (GCDKSCREEN, vBUTTONBOX, object); } void Unregister(object) CDKBUTTONBOX * object CODE: { unregisterCDKObject (vBUTTONBOX, object); } void Raise(object) CDKBUTTONBOX * object CODE: { raiseCDKObject (vBUTTONBOX, object); } void Lower(object) CDKBUTTONBOX * object CODE: { lowerCDKObject (vBUTTONBOX, object); } WINDOW * GetWindow(object) CDKBUTTONBOX * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = CDKLABELPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKLABEL * object CODE: { destroyCDKLabel (object); } MODULE = Cdk PACKAGE = CDKBUTTONBOXPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKBUTTONBOX * object CODE: { destroyCDKButtonbox (object); } MODULE = Cdk PACKAGE = CDKDIALOGPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKDIALOG * object CODE: { destroyCDKDialog (object); } MODULE = Cdk PACKAGE = CDKENTRYPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKENTRY * object CODE: { destroyCDKEntry (object); } MODULE = Cdk PACKAGE = CDKSCROLLPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSCROLL * object CODE: { destroyCDKScroll (object); } MODULE = Cdk PACKAGE = CDKSCALEPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSCALE * object CODE: { destroyCDKScale (object); } MODULE = Cdk PACKAGE = CDKHISTOGRAMPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKHISTOGRAM * object CODE: { destroyCDKHistogram (object); } MODULE = Cdk PACKAGE = CDKMENUPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMENU * object CODE: { destroyCDKMenu (object); } MODULE = Cdk PACKAGE = CDKMENTRYPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMENTRY * object CODE: { destroyCDKMentry (object); } MODULE = Cdk PACKAGE = CDKMATRIXPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMATRIX * object CODE: { destroyCDKMatrix (object); } MODULE = Cdk PACKAGE = CDKMARQUEEPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMARQUEE * object CODE: { destroyCDKMarquee (object); } MODULE = Cdk PACKAGE = CDKSELECTIONPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSELECTION * object CODE: { destroyCDKSelection (object); } MODULE = Cdk PACKAGE = CDKVIEWERPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKVIEWER * object CODE: { destroyCDKViewer (object); } MODULE = Cdk PACKAGE = CDKGRAPHPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKGRAPH * object CODE: { destroyCDKGraph (object); } MODULE = Cdk PACKAGE = CDKRADIOPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKRADIO * object CODE: { destroyCDKRadio (object); } MODULE = Cdk PACKAGE = CDKTEMPLATEPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKTEMPLATE * object CODE: { destroyCDKTemplate (object); } MODULE = Cdk PACKAGE = CDKSWINDOWPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSWINDOW * object CODE: { destroyCDKSwindow (object); } MODULE = Cdk PACKAGE = CDKITEMLISTPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKITEMLIST * object CODE: { destroyCDKItemlist (object); } MODULE = Cdk PACKAGE = CDKFSELECTPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKFSELECT * object CODE: { destroyCDKFselect (object); } MODULE = Cdk PACKAGE = CDKSLIDERPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSLIDER * object CODE: { destroyCDKSlider (object); } MODULE = Cdk PACKAGE = CDKALPHALISTPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKALPHALIST * object CODE: { destroyCDKAlphalist (object); } MODULE = Cdk PACKAGE = CDKCALENDARPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKCALENDAR * object CODE: { destroyCDKCalendar (object); } cdk-perl-20150928/Cdk/0000755000175100001440000000000012171562366012720 5ustar tomuserscdk-perl-20150928/Cdk/Marquee.pm0000644000175100001440000000750212171561423014652 0ustar tomuserspackage Cdk::Marquee; @ISA = qw (Cdk); # # This creates a new Marquee object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Marquee::New( $width, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Set the values. my $message = Cdk::checkReq( $name, "Message", $params{'Message'} ); my $delay = Cdk::checkReq( $name, "Delay", $params{'Delay'} ); my $repeat = Cdk::checkReq( $name, "Repeat", $params{'Repeat'} ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Store the information in both the object and Perl's stack. $self->{'Info'} = Cdk::Marquee::Activate( $self->{'Me'}, $params{'Message'}, $delay, $repeat, $box ); return ( $self->{'Info'} ); } # # This turns off the marquee. # sub deactivate { my $self = shift; Cdk::Marquee::Deactivate( $self->{'Me'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'ULChar'} ) { Cdk::Marquee::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Marquee::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Marquee::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Marquee::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Marquee::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Marquee::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Marquee::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Marquee::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Marquee::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Marquee::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Marquee::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Marquee::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Marquee::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Marquee::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Marquee::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Marquee::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Buttonbox.pm0000644000175100001440000001304112171561421015230 0ustar tomuserspackage Cdk::Buttonbox; @ISA = qw (Cdk); # # This creates a new Buttonbox object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $buttons = Cdk::checkReq( $name, "Buttons", $params{'Buttons'} ); my $rows = Cdk::checkReq( $name, "Rows", $params{'Rows'} ); my $cols = Cdk::checkReq( $name, "Cols", $params{'Cols'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Buttonbox::New( $title, $params{'Buttons'}, $rows, $cols, $height, $width, $xpos, $ypos, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Buttonbox::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Buttonbox::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Buttonbox::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Buttonbox::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'ULChar'} ) { Cdk::Buttonbox::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Buttonbox::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Buttonbox::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Buttonbox::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Buttonbox::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Buttonbox::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Buttonbox::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Buttonbox::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Buttonbox::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Buttonbox::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Buttonbox::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set up the parameters passed in. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); # Bind the key to the function Cdk::Buttonbox::Bind( $self->{'Me'}, $key, $function ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Buttonbox::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Buttonbox::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Buttonbox::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Buttonbox::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Buttonbox::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Buttonbox::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Buttonbox::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Calendar.pm0000644000175100001440000001612212171562366014771 0ustar tomuserspackage Cdk::Calendar; # # This creates a new Calendar object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Get today's date. my ( $today, $thisMonth, $thisYear ) = ( localtime(time) )[ 3, 4, 5 ]; $thisMonth++; $thisYear += 1900; # Set up the parameters passed in. my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $day = Cdk::checkDef( $name, "Day", $params{'Day'}, $today ); my $month = Cdk::checkDef( $name, "Month", $params{'Month'}, $thisMonth ); my $year = Cdk::checkDef( $name, "Year", $params{'Year'}, $thisYear ); my $dAttrib = Cdk::checkDef( $name, "Dattrib", $params{'Dattrib'}, "A_NORMAL" ); my $mAttrib = Cdk::checkDef( $name, "Mattrib", $params{'Mattrib'}, "A_NORMAL" ); my $yAttrib = Cdk::checkDef( $name, "Yattrib", $params{'Yattrib'}, "A_NORMAL" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Calendar::New( $title, $day, $month, $year, $dAttrib, $mAttrib, $yAttrib, $hlight, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; my @result; # Activate the object... if ( defined $params{'Input'} ) { @result = Cdk::Calendar::Activate( $self->{'Me'}, $params{'Input'} ); } else { @result = Cdk::Calendar::Activate( $self->{'Me'} ); } $self->{'Info'} = @result; return @result; } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Calendar::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Calendar::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Calendar::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Calendar::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Calendar::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Calendar::Erase( $self->{'Me'} ); } # # This sets the object... # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # Get today's date. my ( $today, $thisMonth, $thisYear ) = ( localtime(time) )[ 3, 4, 5 ]; $thisMonth++; $thisYear += 1900; # Set up the parameters passed in. my $day = Cdk::checkDef( $name, "Day", $params{'Day'}, $today ); my $month = Cdk::checkDef( $name, "Month", $params{'Month'}, $thisMonth ); my $year = Cdk::checkDef( $name, "Year", $params{'Year'}, $thisYear ); my $dAttrib = Cdk::checkDef( $name, "Dattrib", $params{'Dattrib'}, "" ); my $mAttrib = Cdk::checkDef( $name, "Mattrib", $params{'Mattrib'}, "" ); my $yAttrib = Cdk::checkDef( $name, "Yattrib", $params{'Yattrib'}, "" ); my $highlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); Cdk::Calendar::Set( $self->{'Me'}, $day, $month, $year, $dAttrib, $mAttrib, $yAttrib, $box ); } # # This sets the calendar to a given date. # sub setDate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::setDate"; # Set up the parameters passed in. my $day = Cdk::checkDef( $name, "Day", $params{'Day'}, -1 ); my $month = Cdk::checkDef( $name, "Month", $params{'Month'}, -1 ); my $year = Cdk::checkDef( $name, "Year", $params{'Year'}, -1 ); Cdk::Calendar::SetDate( $self->{'Me'}, $day, $month, $year ); } # # This gets the current date on the given calendar. # sub getDate { my $self = shift; return Cdk::Calendar::GetDate( $self->{'Me'} ); } # # This sets a marker in the calendar widget. # sub setMarker { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::setMarker"; # Set up the parameters passed in. my $day = Cdk::checkReq( $name, "Day", $params{'Day'} ); my $month = Cdk::checkReq( $name, "Month", $params{'Month'} ); my $year = Cdk::checkReq( $name, "Year", $params{'Year'} ); my $marker = Cdk::checkDef( $name, "Marker", $params{'Marker'}, "A_REVERSE" ); Cdk::Calendar::SetMarker( $self->{'Me'}, $day, $month, $year, $marker ); } # # This removes a marker from the calendar widget. # sub removeMarker { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::removeMarker"; # Set up the parameters passed in. my $day = Cdk::checkReq( $name, "Day", $params{'Day'} ); my $month = Cdk::checkReq( $name, "Month", $params{'Month'} ); my $year = Cdk::checkReq( $name, "Year", $params{'Year'} ); Cdk::Calendar::RemoveMarker( $self->{'Me'}, $day, $month, $year ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Calendar::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Calendar::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Calendar::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Calendar::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Calendar::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Debug.pm0000644000175100001440000000075612171561421014303 0ustar tomuserspackage Cdk::Debug; @ISA = qw (Cdk); # # This creates a new Label object # sub DumpScreenRegList { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( "($name) Missing 'Message' value.", $params{'Message'} ); # Call the thing. Cdk::Debug::DumpScreenRegList( $params{'Message'}, $mesg ); } 1; cdk-perl-20150928/Cdk/Alphalist.pm0000644000175100001440000001271112171561420015167 0ustar tomuserspackage Cdk::Alphalist; @ISA = qw (Cdk); # # This creates a new alphalist object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $hBar = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Alphalist::New( $title, $label, $params{'List'}, $height, $width, $xpos, $ypos, $hBar, $filler, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Alphalist::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Alphalist::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Contents'} ) { Cdk::Alphalist::SetContents( $self->{'Me'}, $params{'Contents'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Alphalist::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'Highlight'} ) { Cdk::Alphalist::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'ULChar'} ) { Cdk::Alphalist::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Alphalist::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Alphalist::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Alphalist::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Alphalist::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Alphalist::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Alphalist::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Alphalist::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Alphalist::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Alphalist::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Alphalist::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Alphalist::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Alphalist::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Alphalist::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Alphalist::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Alphalist::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Alphalist::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Alphalist::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Alphalist::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Label.pm0000644000175100001440000000716512171561423014277 0ustar tomusers# $Id: Label.pm,v 1.3 2013/07/17 18:31:47 tom Exp $ package Cdk::Label; @ISA = qw (Cdk); # # This creates a new Label object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( $name, "Message", $params{'Message'} ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Label::New( $params{'Message'}, $xpos, $ypos, $box, $shadow ); bless $self; } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Message'} ) { Cdk::Label::SetMessage( $self->{'Me'}, $params{'Message'} ); } if ( defined $params{'ULChar'} ) { Cdk::Label::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Label::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Label::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Label::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Label::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Label::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Label::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Label::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Label::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the label object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Label::Draw( $self->{'Me'}, $box ); } # # This erases the object from the screen. # sub erase { my $self = shift; Cdk::Label::Erase( $self->{'Me'} ); } # # This gives the user the ability to wait until a key is hit. # sub wait { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::wait"; # Set up the parameters passed in. my $key = Cdk::checkDef( $name, "Key", $params{'Key'}, '' ); my $code = 0; if ( $key ne '' ) { $code = ord $key; } # Sit and wait. Cdk::Label::Wait( $self->{'Me'}, $code ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Label::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Label::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Label::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Label::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Label::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Mentry.pm0000644000175100001440000001265012171561424014532 0ustar tomuserspackage Cdk::Mentry; @ISA = qw (Cdk); # # This creates a new Mentry object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $fWidth = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $physical = Cdk::checkReq( $name, "Prows", $params{'Prows'} ); my $logical = Cdk::checkReq( $name, "Lrows", $params{'Lrows'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $min = Cdk::checkDef( $name, "Min", $params{'Min'}, 0 ); my $dispType = Cdk::checkDef( $name, "Dtype", $params{'Dtype'}, "MIXED" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Mentry::New( $title, $label, $min, $physical, $logical, $fWidth, $dispType, $filler, $xpos, $ypos, $fieldattr, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Mentry::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Mentry::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Mentry::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Mentry::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Min'} ) { Cdk::Mentry::SetMin( $self->{'Me'}, $params{'Min'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Mentry::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'ULChar'} ) { Cdk::Mentry::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Mentry::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Mentry::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Mentry::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Mentry::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Mentry::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Mentry::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Mentry::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Mentry::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Mentry::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Mentry::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Mentry::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Mentry::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Mentry::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Mentry::Erase( $self->{'Me'} ); } # # This cleans the information inside the object. # sub clean { my $self = shift; Cdk::Mentry::Clean( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Slider.pm0000644000175100001440000001323512171561425014477 0ustar tomuserspackage Cdk::Slider; # # This creates a new Slider object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $low = Cdk::checkReq( $name, "Low", $params{'Low'} ); my $high = Cdk::checkReq( $name, "High", $params{'High'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $inc = Cdk::checkDef( $name, "Inc", $params{'Inc'}, 1 ); my $fastInc = Cdk::checkDef( $name, "Fastinc", $params{'Fastinc'}, 5 ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $start = Cdk::checkDef( $name, "Start", $params{'Start'}, $params{'Low'} ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, " " ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Slider::New( $title, $label, $start, $low, $high, $inc, $fastInc, $width, $xpos, $ypos, $filler, $box, $shadow ); bless $self; } # # This activates the object. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Slider::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Slider::Activate( $self->{'Me'} ); } return $self->{'Info'}; } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return Cdk::Slider::Inject( $self->{'Me'}, $character ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Slider::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Slider::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Slider::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Slider::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Slider::Erase( $self->{'Me'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Slider::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Low'} ) { Cdk::Slider::SetLowHigh( $self->{'Me'}, $params{'Low'}, $params{'High'} ); } if ( defined $params{'ULChar'} ) { Cdk::Slider::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Slider::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Slider::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Slider::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Slider::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Slider::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Slider::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Slider::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Slider::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function raises the object. # sub raise { my $self = shift; Cdk::Slider::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Slider::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Slider::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Slider::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Slider::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Itemlist.pm0000644000175100001440000001337012171561423015045 0ustar tomuserspackage Cdk::Itemlist; @ISA = qw (Cdk); # # This creates a new Itemlist object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $info = Cdk::checkReq( $name, "List", $params{'List'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $default = Cdk::checkDef( $name, 'Default', $params{'Default'}, 0 ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Itemlist::New( $title, $label, $params{'List'}, $default, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Itemlist::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Itemlist::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Itemlist::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Values'} ) { Cdk::Itemlist::SetValues( $self->{'Me'}, $params{'Values'} ); } if ( defined $params{'DefaultItem'} ) { Cdk::Itemlist::SetDefaultItem( $self->{'Me'}, $params{'DefaultItem'} ); } if ( defined $params{'CurrentItem'} ) { Cdk::Itemlist::SetCurrentItem( $self->{'Me'}, $params{'CurrentItem'} ); } if ( defined $params{'ULChar'} ) { Cdk::Itemlist::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Itemlist::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Itemlist::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Itemlist::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Itemlist::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Itemlist::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Itemlist::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Itemlist::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Itemlist::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Itemlist::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Itemlist::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Itemlist::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Itemlist::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Itemlist::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Itemlist::Erase( $self->{'Me'} ); } # # This cleans the info inside the entry object. # sub clean { my $self = shift; Cdk::Itemlist::Clean( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Itemlist::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Itemlist::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Itemlist::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Itemlist::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Itemlist::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Histogram.pm0000644000175100001440000001001412171561422015177 0ustar tomuserspackage Cdk::Histogram; @ISA = qw (Cdk); # # This creates a new Histogram object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $orient = Cdk::checkReq( $name, "Orient", $params{'Orient'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Histogram::New( $title, $height, $width, $orient, $xpos, $ypos, $box, $shadow ); bless $self; } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Histogram::SetValue( $self->{'Me'}, $params{'Low'}, $params{'High'}, $params{'Value'} ); } if ( defined $params{'DisplayType'} ) { Cdk::Histogram::SetDisplayType( $self->{'Me'}, $params{'DisplayType'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Histogram::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'StatsPos'} ) { Cdk::Histogram::SetStatsPos( $self->{'Me'}, $params{'StatsPos'} ); } if ( defined $params{'StatsAttr'} ) { Cdk::Histogram::SetStatsAttr( $self->{'Me'}, $params{'StatsAttr'} ); } if ( defined $params{'ULChar'} ) { Cdk::Histogram::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Histogram::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Histogram::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Histogram::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Histogram::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Histogram::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Histogram::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Histogram::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Histogram::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Histogram::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Histogram::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Histogram::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Histogram::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Histogram::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Histogram::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Histogram::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Scroll.pm0000644000175100001440000001447612171561425014523 0ustar tomuserspackage Cdk::Scroll; @ISA = qw (Cdk); # # This creates a new Scroll object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $spos = Cdk::checkDef( $name, "Spos", $params{'Spos'}, "NONE" ); my $numbers = Cdk::checkDef( $name, "Numbers", $params{'Numbers'}, "FALSE" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Scroll::New( $title, $params{'List'}, $height, $width, $xpos, $ypos, $spos, $numbers, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Scroll::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Scroll::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Scroll::Inject( $self->{'Me'}, $character ) ); } # # This adds a line to the scrolling list. # sub add { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::add"; # Set the values. my $item = Cdk::checkReq( $name, "Item", $params{'Item'} ); Cdk::Scroll::Add( $self->{'Me'}, $item ); } # # This deletes a line from the scrolling list. # sub delete { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::delete"; # Set the values. my $position = Cdk::checkReq( $name, "Position", $params{'Position'} ); Cdk::Scroll::Delete( $self->{'Me'}, $position ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scroll::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scroll::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scroll::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Scroll::Draw( $self->{'Me'}, $box ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Items'} ) { Cdk::Scroll::SetItems( $self->{'Me'}, $params{'Items'} ); } if ( defined $params{'Highlight'} ) { Cdk::Scroll::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'ULChar'} ) { Cdk::Scroll::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Scroll::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Scroll::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Scroll::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Scroll::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Scroll::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Scroll::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Scroll::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Scroll::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This erases the object. # sub erase { my $self = shift; Cdk::Scroll::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Scroll::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Scroll::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Scroll::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Scroll::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Scroll::GetWindow( $self->{'Me'} ); } # # This function returns the size of the scrolling list and the # currently highlighted item. # sub info { my $self = shift; return Cdk::Scroll::Info( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Swindow.pm0000644000175100001440000001672212171561425014713 0ustar tomuserspackage Cdk::Swindow; @ISA = qw (Cdk); # # This creates a new Swindow object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $lines = Cdk::checkReq( $name, "Lines", $params{'Lines'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Swindow::New( $title, $lines, $height, $width, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Swindow::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Swindow::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Swindow::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Swindow::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Swindow::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Swindow::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Contents'} ) { Cdk::Swindow::SetContents( $self->{'Me'}, $params{'Contents'} ); } if ( defined $params{'ULChar'} ) { Cdk::Swindow::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Swindow::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Swindow::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Swindow::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Swindow::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Swindow::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Swindow::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Swindow::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Swindow::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This adds a line into the scrolling window. # sub addline { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::addline"; # Set up the parameters passed in. my $info = Cdk::checkReq( $name, "Info", $params{'Info'} ); my $position = Cdk::checkDef( $name, "Position", $params{'Position'}, "BOTTOM" ); Cdk::Swindow::Addline( $self->{'Me'}, $info, $position ); } # # This allows the user to spawn a command via a scrolling window. # sub exec { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::addline"; # Set up the parameters passed in. my $command = Cdk::checkReq( $name, "Command", $params{'Command'} ); my $position = Cdk::checkDef( $name, "Position", $params{'Position'}, "BOTTOM" ); return Cdk::Swindow::Exec( $self->{'Me'}, $command, $position ); } # # This trims the scrolling window. # sub trim { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::trim"; # Set up the parameters passed in. my $start = Cdk::checkReq( $name, "Start", $params{'Start'} ); my $finish = Cdk::checkReq( $name, "Finish", $params{'Finish'} ); Cdk::Swindow::Trim( $self->{'Me'}, $start, $finish ); } # # This cleans the info from the window. # sub clean { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::clean"; Cdk::Swindow::Clean( $self->{'Me'} ); } # # This saves the information in the swindow to a file. # sub save { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::save"; Cdk::Swindow::Save( $self->{'Me'} ); } # # This loads information into the swindow from a file. # sub load { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::load"; Cdk::Swindow::Load( $self->{'Me'} ); } # # This saves the information in the swindow to the given file. # sub dump { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::dump"; my $filename = Cdk::checkReq( $name, "Filename", $params{'Filename'} ); Cdk::Swindow::Dump( $self->{'Me'}, $filename ); } # # This returns the information from the scrolling window. # sub get { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::get"; return ( Cdk::Swindow::Get( $self->{'Me'} ) ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Swindow::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Swindow::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Swindow::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Swindow::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Swindow::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Swindow::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Swindow::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Graph.pm0000644000175100001440000000722412171561422014314 0ustar tomusers# $Id: Graph.pm,v 1.3 2013/07/17 18:31:46 tom Exp $ package Cdk::Graph; @ISA = qw (Cdk); # # This creates a new Graph object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $xtitle = Cdk::checkReq( $name, "Xtitle", $params{'Xtitle'} ); my $ytitle = Cdk::checkReq( $name, "ytitle", $params{'Ytitle'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); # Create the thing. $self->{'Me'} = Cdk::Graph::New( $title, $xtitle, $ytitle, $height, $width, $xpos, $ypos ); bless $self; } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Values'} ) { my $startAtZero = $params{'StartAtZero'} || 1; Cdk::Graph::SetValues( $self->{'Me'}, $params{'Values'}, $startAtZero ); } if ( defined $params{'GraphChars'} ) { Cdk::Graph::SetCharacters( $self->{'Me'}, $params{'GraphChars'} ); } if ( defined $params{'DisplayType'} ) { Cdk::Graph::SetDisplayType( $self->{'Me'}, $params{'DisplayType'} ); } if ( defined $params{'ULChar'} ) { Cdk::Graph::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Graph::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Graph::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Graph::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Graph::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Graph::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Graph::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Graph::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Graph::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "FALSE" ); # Draw the object. Cdk::Graph::Draw( $self->{'Me'}, $box ); return 1; } # # This erases the object. # sub erase { my $self = shift; Cdk::Graph::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Graph::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Graph::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Graph::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Graph::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Graph::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Matrix.pm0000644000175100001440000001575212171561423014525 0ustar tomuserspackage Cdk::Matrix; @ISA = qw (Cdk); # # This creates a new Matrix object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $rowtitles = Cdk::checkReq( $name, "RowTitles", $params{'RowTitles'} ); my $coltitles = Cdk::checkReq( $name, "ColTitles", $params{'ColTitles'} ); my $colwidths = Cdk::checkReq( $name, "ColWidths", $params{'ColWidths'} ); my $coltypes = Cdk::checkReq( $name, "ColTypes", $params{'ColTypes'} ); my $vrows = Cdk::checkReq( $name, "Vrows", $params{'Vrows'} ); my $vcols = Cdk::checkReq( $name, "Vcols", $params{'Vcols'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $rowSpace = Cdk::checkDef( $name, "RowSpace", $params{'RowSpace'}, 1 ); my $colSpace = Cdk::checkDef( $name, "ColSpace", $params{'ColSpace'}, 1 ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $dominant = Cdk::checkDef( $name, "Dominant", $params{'Dominant'}, "NONE" ); my $box = Cdk::checkDef( $name, "BoxMatrix", $params{'BoxMatrix'}, "FALSE" ); my $boxCell = Cdk::checkDef( $name, "BoxCell", $params{'BoxCell'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Matrix::New( $title, $params{'RowTitles'}, $params{'ColTitles'}, $params{'ColWidths'}, $params{'ColTypes'}, $vrows, $vcols, $xpos, $ypos, $rowSpace, $colSpace, $filler, $dominant, $boxCell, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the matrix. return ( Cdk::Matrix::Activate( $self->{'Me'} ) ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Matrix::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Values'} ) { Cdk::Matrix::Set( $self->{'Me'}, $params{'Values'} ); } if ( defined $params{'Cell'} ) { Cdk::Matrix::SetCell( $self->{'Me'}, $params{'Row'}, $params{'Col'}, $params{'Value'} ); } if ( defined $params{'ULChar'} ) { Cdk::Matrix::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Matrix::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Matrix::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Matrix::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Matrix::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Matrix::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Matrix::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Matrix::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Matrix::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # These get several parameters of the widget. # sub getCell { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::getCell"; Cdk::Matrix::GetCell( $self->{'Me'}, $params{'Row'}, $params{'Col'} ); } sub getCol { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::getCol"; Cdk::Matrix::GetCol( $self->{'Me'} ); } sub getRow { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::getRow"; Cdk::Matrix::GetRow( $self->{'Me'} ); } # # This allows the user to clean the matrices cell values. # sub clean { my $self = shift; my $name = "$self->{'Type'}::clean"; Cdk::Matrix::Clean( $self->{'Me'} ); } # # This allows the user to dump the matrices cell values. # sub dump { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::flush"; my $title = $params{'Title'} || "No Title"; # Call the function that does this. Cdk::Matrix::Dump( $self->{'Me'}, $title ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Matrix::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Matrix::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Matrix::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Matrix::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Matrix::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Matrix::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Matrix::GetWindow( $self->{'Me'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Matrix::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Matrix::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Matrix::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } 1; cdk-perl-20150928/Cdk/Template.pm0000644000175100001440000001330212171561426015024 0ustar tomuserspackage Cdk::Template; @ISA = qw (Cdk); # # This creates a new Template object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $plate = Cdk::checkReq( $name, "Plate", $params{'Plate'} ); my $overlay = Cdk::checkReq( $name, "Overlay", $params{'Overlay'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Template::New( $title, $label, $plate, $overlay, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Template::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Template::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Template::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Template::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Min'} ) { Cdk::Template::SetMin( $self->{'Me'}, $params{'Min'} ); } if ( defined $params{'ULChar'} ) { Cdk::Template::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Template::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Template::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Template::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Template::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Template::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Template::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Template::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Template::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Template::Get( $self->{'Me'} ) ); } # # This binds a given key to a given function. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Template::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Template::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Template::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Template::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Template::Erase( $self->{'Me'} ); } # # This cleans the template info field. # sub clean { my $self = shift; Cdk::Template::Clean( $self->{'Me'} ); } # # This mixes the results with the overlay # sub mix { my $self = shift; Cdk::Template::Mix( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Template::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Template::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Template::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Template::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Template::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Radio.pm0000644000175100001440000001357412171561424014320 0ustar tomuserspackage Cdk::Radio; @ISA = qw (Cdk); # # This creates a new Radio object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $spos = Cdk::checkDef( $name, "Spos", $params{'Spos'}, "NONE" ); my $choice = Cdk::checkDef( $name, "Choice", $params{'Choice'}, "X" ); my $default = Cdk::checkDef( $name, "Default", $params{'Default'}, 0 ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Radio::New( $title, $params{'List'}, $height, $width, $xpos, $ypos, $spos, $choice, $default, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Radio::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Radio::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Radio::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Radio::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Radio::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Radio::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Radio::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'Choice'} ) { Cdk::Radio::SetChoiceCharacter( $self->{'Me'}, $params{'Choice'} ); } if ( defined $params{'LeftBrace'} ) { Cdk::Radio::SetLeftBrace( $self->{'Me'}, $params{'LeftBrace'} ); } if ( defined $params{'RightBrace'} ) { Cdk::Radio::SetRightBrace( $self->{'Me'}, $params{'RightBrace'} ); } if ( defined $params{'ULChar'} ) { Cdk::Radio::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Radio::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Radio::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Radio::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Radio::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Radio::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Radio::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Radio::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Radio::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Radio::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Radio::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Radio::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Radio::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Radio::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Radio::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Radio::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Entry.pm0000644000175100001440000001433612171561422014356 0ustar tomuserspackage Cdk::Entry; @ISA = qw (Cdk); # # This creates a new Entry object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $max = Cdk::checkReq( $name, "Max", $params{'Max'} ); my $fWidth = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $min = Cdk::checkDef( $name, "Min", $params{'Min'}, 0 ); my $dispType = Cdk::checkDef( $name, "Dtype", $params{'Dtype'}, "MIXED" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $fAttr = Cdk::checkDef( $name, "Fattrib", $params{'Fattrib'}, "A_NORMAL" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Entry::New( $title, $params{'Label'}, $min, $max, $fWidth, $filler, $dispType, $xpos, $ypos, $fAttr, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Entry::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Entry::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Entry::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Entry::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Min'} ) { Cdk::Entry::SetMin( $self->{'Me'}, $params{'Min'} ); } if ( defined $params{'Max'} ) { Cdk::Entry::SetMax( $self->{'Me'}, $params{'Max'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Entry::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'HiddenChar'} ) { Cdk::Entry::SetHiddenChar( $self->{'Me'}, $params{'HiddenChar'} ); } if ( defined $params{'ULChar'} ) { Cdk::Entry::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Entry::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Entry::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Entry::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Entry::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Entry::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Entry::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Entry::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Entry::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Entry::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Entry::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Entry::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Entry::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Entry::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Entry::Erase( $self->{'Me'} ); } # # This cleans the info inside the entry object. # sub clean { my $self = shift; Cdk::Entry::Clean( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Entry::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Entry::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Entry::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Entry::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Entry::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Dialog.pm0000644000175100001440000001255112171561421014450 0ustar tomuserspackage Cdk::Dialog; @ISA = qw (Cdk); # # This creates a new Dialog object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( $name, "Message", $params{'Message'} ); my $buttons = Cdk::checkReq( $name, "Buttons", $params{'Buttons'} ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $sep = Cdk::checkDef( $name, "Seperator", $params{'Seperator'}, "TRUE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Dialog::New( $params{'Message'}, $params{'Buttons'}, $xpos, $ypos, $hlight, $sep, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Dialog::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Dialog::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Dialog::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Dialog::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'Separator'} ) { Cdk::Dialog::SetSeparator( $self->{'Me'}, $params{'Separator'} ); } if ( defined $params{'ULChar'} ) { Cdk::Dialog::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Dialog::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Dialog::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Dialog::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Dialog::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Dialog::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Dialog::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Dialog::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Dialog::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Dialog::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Dialog::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set up the parameters passed in. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); # Bind the key to the function Cdk::Dialog::Bind( $self->{'Me'}, $key, $function ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Dialog::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Dialog::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Dialog::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Dialog::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Dialog::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Dialog::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Dialog::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Fselect.pm0000644000175100001440000001520712171561422014640 0ustar tomuserspackage Cdk::Fselect; @ISA = qw (Cdk); # # This creates a new file selector object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $dattrib = Cdk::checkDef( $name, "Dattrib", $params{'Dattrib'}, "" ); my $fattrib = Cdk::checkDef( $name, "Fattrib", $params{'Fattrib'}, "" ); my $lattrib = Cdk::checkDef( $name, "Lattrib", $params{'Lattrib'}, "" ); my $sattrib = Cdk::checkDef( $name, "Sattrib", $params{'Sattrib'}, "" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $fAttr = Cdk::checkDef( $name, "Fieldattr", $params{'Fieldattr'}, "A_NORMAL" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Fselect::New( $title, $label, $height, $width, $dattrib, $fattrib, $lattrib, $sattrib, $hlight, $fAttr, $filler, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Fselect::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Fselect::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Directory'} ) { Cdk::Fselect::SetDirectory( $self->{'Me'}, $params{'Directory'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Fselect::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'Highlight'} ) { Cdk::Fselect::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'DirAttribute'} ) { Cdk::Fselect::SetDirAttribute( $self->{'Me'}, $params{'DirAttribute'} ); } if ( defined $params{'LinkAttribute'} ) { Cdk::Fselect::SetLinkAttribute( $self->{'Me'}, $params{'LinkAttribute'} ); } if ( defined $params{'FileAttribute'} ) { Cdk::Fselect::SetFileAttribute( $self->{'Me'}, $params{'FileAttribute'} ); } if ( defined $params{'SocketAttribute'} ) { Cdk::Fselect::SetSocketAttribute( $self->{'Me'}, $params{'SocketAttribute'} ); } if ( defined $params{'ULChar'} ) { Cdk::Fselect::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Fselect::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Fselect::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Fselect::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Fselect::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Fselect::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Fselect::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Fselect::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Fselect::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Fselect::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Fselect::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Fselect::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Fselect::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Fselect::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Fselect::Erase( $self->{'Me'} ); } # # This cleans the info inside the entry object. # sub clean { my $self = shift; Cdk::Fselect::Clean( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Fselect::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Fselect::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Fselect::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Fselect::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Fselect::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Selection.pm0000644000175100001440000001416412171561425015204 0ustar tomuserspackage Cdk::Selection; @ISA = qw (Cdk); # # This creates a new Selection object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $choices = Cdk::checkReq( $name, "Choices", $params{'Choices'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $spos = Cdk::checkDef( $name, "Spos", $params{'Spos'}, "NONE" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Selection::New( $title, $params{'List'}, $params{'Choices'}, $height, $width, $xpos, $ypos, $spos, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; my @choices = (); # Activate the object... if ( defined $params{'Input'} ) { @choices = Cdk::Selection::Activate( $self->{'Me'}, $params{'Input'} ); } else { @choices = Cdk::Selection::Activate( $self->{'Me'} ); } if ( !defined $choices[0] ) { return; } else { $self->{'Info'} = \@choices; return @choices; } } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Selection::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Selection::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Selection::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Selection::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Selection::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'Choices'} ) { Cdk::Selection::SetChoices( $self->{'Me'}, $params{'Choices'} ); } if ( defined $params{'Choice'} ) { Cdk::Selection::SetChoice( $self->{'Me'}, $params{'Choice'}, $params{'Index'} ); } if ( defined $params{'Modes'} ) { Cdk::Selection::SetModes( $self->{'Me'}, $params{'Modes'} ); } if ( defined $params{'Mode'} ) { Cdk::Selection::SetMode( $self->{'Me'}, $params{'Mode'}, $params{'Index'} ); } if ( defined $params{'ULChar'} ) { Cdk::Selection::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Selection::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Selection::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Selection::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Selection::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Selection::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Selection::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Selection::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Selection::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Selection::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Selection::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Selection::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Selection::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Selection::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Selection::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Selection::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Menu.pm0000644000175100001440000000766512171561424014172 0ustar tomuserspackage Cdk::Menu; @ISA = qw (Cdk); # # This creates a new Menu object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $menuList = Cdk::checkReq( $name, "Menulist", $params{'Menulist'} ); my $menuLoc = Cdk::checkReq( $name, "Menuloc", $params{'Menuloc'} ); my $menuPos = Cdk::checkDef( $name, "Menupos", $params{'Menupos'}, "TOP" ); my $titleAttr = Cdk::checkDef( $name, "Tattrib", $params{'Tattrib'}, "A_REVERSE" ); my $subTitleAttr = Cdk::checkDef( $name, "SubTattrib", $params{'SubTattrib'}, "A_REVERSE" ); # Create the thing. $self->{'Me'} = Cdk::Menu::New( $params{'Menulist'}, $params{'Menuloc'}, $titleAttr, $subTitleAttr, $menuPos ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; my $itemPicked; # Activatate the menu if ( defined $params{'Input'} ) { $itemPicked = Cdk::Menu::Activate( $self->{'Me'}, $params{'Input'} ); } else { $itemPicked = Cdk::Menu::Activate( $self->{'Me'} ); } return if !defined $itemPicked; $self->{'Info'} = $itemPicked; # Create the menu and submenu item values and return them. my $menuItem = int( $itemPicked / 100 ); my $submenuItem = ( $itemPicked % 100 ) + 1; # Return the two values. return ( ( $menuItem, $submenuItem, $itemPicked ) ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Menu::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'CurrentItem'} ) { Cdk::Menu::SetCurrentItem( $self->{'Me'}, $params{'CurrentItem'} ); } if ( defined $params{'TitleHighlight'} ) { Cdk::Menu::SetTitleHighlight( $self->{'Me'}, $params{'TitleHighlight'} ); } if ( defined $params{'SubTitleHighlight'} ) { Cdk::Menu::SetSubTitleHighlight( $self->{'Me'}, $params{'SubTitleHighlight'} ); } if ( defined $params{'BGColor'} ) { Cdk::Menu::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Draw the object. Cdk::Menu::Draw( $self->{'Me'} ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Menu::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Menu::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Menu::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Menu::PostProcess( $self->{'Me'}, $params{'Function'} ); } 1; cdk-perl-20150928/Cdk/Scale.pm0000644000175100001440000001330112171561424014275 0ustar tomuserspackage Cdk::Scale; # # This creates a new Scale object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; my $numWidth = length( $params{'High'} ) + 2; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $low = Cdk::checkReq( $name, "Low", $params{'Low'} ); my $high = Cdk::checkReq( $name, "High", $params{'High'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $width = Cdk::checkDef( $name, "Width", $params{'Width'}, $numWidth ); my $inc = Cdk::checkDef( $name, "Inc", $params{'Inc'}, 1 ); my $fastInc = Cdk::checkDef( $name, "Fastinc", $params{'Fastinc'}, 5 ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $start = Cdk::checkDef( $name, "Start", $params{'Start'}, $params{'Low'} ); my $fAttr = Cdk::checkDef( $name, "Fattrib", $params{'Fattrib'}, "A_NORMAL" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Scale::New( $title, $label, $start, $low, $high, $inc, $fastInc, $width, $xpos, $ypos, $fAttr, $box, $shadow ); bless $self; } # # This activates the object. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Scale::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Scale::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Scale::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scale::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scale::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scale::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Scale::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Scale::Erase( $self->{'Me'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Scale::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Low'} ) { Cdk::Scale::SetLowHigh( $self->{'Me'}, $params{'Low'}, $params{'High'} ); } if ( defined $params{'ULChar'} ) { Cdk::Scale::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Scale::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Scale::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Scale::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Scale::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Scale::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Scale::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Scale::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Scale::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function raises the object. # sub raise { my $self = shift; Cdk::Scale::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Scale::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Scale::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Scale::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Scale::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/Cdk/Diag.pm0000644000175100001440000000263212171561421014114 0ustar tomuserspackage Cdk::Diag; @ISA = qw (Cdk); # # This creates a new Label object # sub getScreenRegList { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( $name, "Message", $params{'Message'} ); # Call the thing. Cdk::Diag::DumpScreenRegList($mesg); } # # This writes to the log file. # sub Log { my ( $mesgType, $widgetType, $mesg ) = @_; # If the environment flag CDKDIAG is not set then get out. return if ( !defined $ENV{'CDKDIAG'} ); # Set up the local vars. my $filename = $ENV{'CDKLOGFILE'} || "cdkdiag.log"; my $date = qx (date); chomp $date; my $diagType = uc $ENV{'CDKDIAG'}; # Only write the output if the diagnostics tell us to. if ( $diagType eq "ALL" || $diagType =~ uc $widgetType ) { # Open the file open( XXX, ">>$filename" ); select(XXX); $| = 1; print XXX "\n*** Diagnostic Start: Program=<$0> Time: <$date> ***\n" if !$DIAGFLAG; # Check the message type. print XXX "$mesgType - ($widgetType) $mesg\n" if ( $mesgType eq "Diag" ); print XXX "$mesgType - ($widgetType) $mesg\n" if ( $mesgType eq "Error" ); close(XXX); $DIAGFLAG = 1; } } 1; cdk-perl-20150928/Cdk/Viewer.pm0000644000175100001440000001072112171561426014514 0ustar tomuserspackage Cdk::Viewer; @ISA = qw (Cdk); # # This creates a new Viewer object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $buttons = Cdk::checkReq( $name, "Buttons", $params{'Buttons'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Viewer::New( $params{'Buttons'}, $height, $width, $hlight, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the viewer. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... $self->{'Info'} = Cdk::Viewer::Activate( $self->{'Me'} ); return ( $self->{'Info'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Info'} ) { my $interpret = $params{'Interpret'} || 1; Cdk::Viewer::SetInfo( $self->{'Me'}, $params{'Info'}, $interpret ); } if ( defined $params{'Title'} ) { Cdk::Viewer::SetTitle( $self->{'Me'}, $params{'Title'} ); } if ( defined $params{'Highlight'} ) { Cdk::Viewer::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'InfoLine'} ) { Cdk::Viewer::SetInfoLine( $self->{'Me'}, $params{'InfoLine'} ); } if ( defined $params{'ULChar'} ) { Cdk::Viewer::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Viewer::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Viewer::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Viewer::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Viewer::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Viewer::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Viewer::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Viewer::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Viewer::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Viewer::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Viewer::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Viewer::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Viewer::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Viewer::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Viewer::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Viewer::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Viewer::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20150928/fulldemo/0000755000175100001440000000000012170627073014022 5ustar tomuserscdk-perl-20150928/fulldemo/help/0000755000175100001440000000000011733457055014757 5ustar tomuserscdk-perl-20150928/fulldemo/help/marquee.help0000644000175100001440000000763106634015407017272 0ustar tomusersPurpose The marquee widget creates a scrolling marquee on the screen. This helps to emphasize a point or draw attention to something. Construction Options A marquee widget is defined using the following syntax. The variable $marqueeObject contains the reference to the marquee object. $marqueeObject = new Cdk::Marquee ( options ); The options are defined in the following table. Option Default Value Type Purpose Width Required Scalar This is the actual width of the marquee window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a marquee widget. $marqueeObject->activate ( options ); The options are defined in the following table. Option Default Value Type Purpose Mesg Required Scalar This is the message to display in the marquee. Delay Required Scalar This is a value telling the marquee how long to wait before moving the message. Repeat Required Scalar This states how many times the message will scroll across the marquee. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $marqueeObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $marqueeObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $marqueeObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $marqueeObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $marqueeObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $marqueeObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $marqueeObject->getwin(); Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 cdk-perl-20150928/fulldemo/help/bugs.help0000644000175100001440000000042706634015407016567 0ustar tomusersKnown Bugs Currently there are no bugs that I know of. I'm sure once people start playing with this extension, bugs will be found. Happy hunting. :) (of course the documentation may be a wee bit out of date. :) ) <#HL(70)> Document Created: November, 1995 cdk-perl-20150928/fulldemo/help/dialog.help0000644000175100001440000002714711733450471017076 0ustar tomusersPurpose The Cdk Dialog widget allows the user to pick from a number of options using buttons provided. The dialog box presents a message, and a list of options using the buttons. Construction Options A dialog widget is defined using the following syntax. The variable $dialogObject contains the reference to the dialog object. $dialogObject = new Cdk::Dialog ( options ); The options are defined in the following table. Option Default Value Type Purpose Mesg Required List Ref This is the message which is displayed in the dialog box. Buttons Required List Ref This is a list of the button labels. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Highlight Reverse Scalar The highlight attribute of the currently selected button. Separator True Scalar This Boolean value states whether a separator will be drawn between the message and the buttons. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a dialog widget. $returnValue = $dialogObject->activate (); The variable $returnValue contains an integer value representing which button was actually selected. The value starts at zero and goes up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $dialogObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $dialogObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Required Scalar Changes the current highlight attribute. Separator Required Scalar Changes the current value for the separator flag. Box True Scalar Changes the current value for the box flag. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $dialogObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $dialogObject->erase (); bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $dialogObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $dialogObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $alphalistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $dialogObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $alphalistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $dialogObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $dialogObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $dialogObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $dialogObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $dialogObject->getwin(); Default Key Bindings Key Action Left Arrow Highlights the button to the left of the currently highlighted button. Right Arrow Highlights the button to the right of the currently highlighted button. Space Highlights the button to the right of the currently highlighted button. Return Exits the widget and returns a value representing the selected button. The range of the value is from 0 to the number of buttons -1. Tab Exits the widget and returns a value representing the selected button. The range of the value is from 0 to the number of buttons -1. Escape Exits the dialog widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks If you pass the dialog with no message and no separator, the dialog box appears be a tool bar. Physical Restrictions Restriction Value Maximum message rows. 50 Maximum dialog buttons. 25 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: January, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/fselect.help0000644000175100001440000003135411733450560017256 0ustar tomusersPurpose The Cdk file selector widget allows the user to select a valid file using a full screen interface. Construction Options The file selector widget is defined using the following syntax. The variable $fselectObject contains the reference to the entry object. $fselectObject = new Cdk::Fselect ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label of the widget. Height Required Scalar The height of the widget. Width Required Scalar The width of the widget. Dattrib Normal Scalar The display attributes of a directory inside the scroll region. Fattrib Normal Scalar The display attributes of a file inside the scroll region. Lattrib Normal Scalar The display attributes of a link inside the scroll region. Sattrib Normal Scalar The display attributes of a socket inside the scroll region. Highlight Reverse Scalar The highlight attribute of the scrolling list. Fieldattr Normal Scalar The attribute of the characters typed in. Filler . Scalar The default field character. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. $returnValue = $fselectObject->activate (); The variable $returnValue contains a scalar value of what was typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $fselectObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the entry field. $fselectObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Directory Required Scalar The directory to display. Dattrib Normal Scalar The display attributes of a directory inside the scroll region. Fattrib Normal Scalar The display attributes of a file inside the scroll region. Lattrib Normal Scalar The display attributes of a link inside the scroll region. Sattrib Normal Scalar The display attributes of a socket inside the scroll region. Highlight Reverse Scalar The highlight attribute of the scrolling list. Fieldattr Normal Scalar The attribute of the characters typed in. Filler . Scalar The default field character. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $fselectObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $fselectObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $fselectObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $fselectObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $fselectObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $fselectObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $fselectObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $fselectObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $fselectObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $fselectObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $fselectObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $fselectObject->getwin(); Default Key Bindings Since this widget is 'driven' by the entry field the default key bindings of that widget apply. There are others which have been applied, they are listed below. Key Action Return If the file is a directory, then the file selector will change directories. Otherwise the widget will return the full pathname of the selected file. TAB Displays intformation about the currnetly highlighted file. Key Up Scrolls the list one item backward. Page Up Scrolls the list one page backward. CTRL-B Scrolls the list one page backward. Key Down Scrolls the list one line forward. Page Down Scrolls the list one page forward. CTRL-F Scrolls the list one page forward. Escape Exits the widget and returns undef. Tips & Tricks None. Physical Restrictions Same as the scrolling list. Example Use Of The Widget <#HL(70)> Document Created: December, 1995 Document Revised: March, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/swindow.help0000644000175100001440000003055111733451011017311 0ustar tomusersPurpose A scrolling window widget allows the programmer to display a scrolling message window. This widget allows a programmer to add current messages to the window. This type of widget is best used for a log file. Construction Options A swindow widget is defined using the following syntax. The variable $swindowObject contains a reference to the swindow object. $swindowObject = new Cdk::Swindow ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the scrolling window. Lines Required Scalar The number of lines to keep. Height Required Scalar The height of the scrolling window. Width Required Scalar The width of the scrolling window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a swindow widget. $swindowObject->activate (); inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $swindowObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $swindowObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Info Required Array Ref Sets the contents of the window. Lines Required Scalar Sets the number of lines to keep. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $swindowObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $swindowObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $swindowObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $swindowObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $swindowObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $swindowObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. addline This method adds a line to the scrolling window. The following example demonstrates how to call the addline method. $swindowObject->addline ( options ); The options are defined in the following table. Option Default Value Type Purpose Info Required Scalar The information to add to the window. Position Bottom Scalar The location where the information is to be added. trim This method trims the information maintained by the srolling window. The following example demonstrates how to call the trim method. $swindowObject->trim ( options ); The options are defined in the following table. Option Default Value Type Purpose Start Required Scalar This is the first line to trim from. Finish Required Scalar This is the last line to trim from. get This method returns the information currently in the srolling window. The following example demonstrates how to call the get method. @information = $swindowObject->get (); erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $swindowObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $swindowObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $swindowObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $swindowObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $swindowObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $swindowObject->getwin(); Default Key Bindings Key Action Up Arrow Scrolls the window up by one line. Down Arrow Scrolls the window down by one line. Right Arrow Scrolls the window right by one line. Left Arrow Scrolls the window left by one line. Prev Page Displays the previous page. CTRL-B Displays the previous page. B Displays the previous page. b Displays the previous page. Next Page Displays the next page. CTRL-F Displays the next page. Space Displays the next page. F Displays the next page. f Displays the next page. Home Moves to the far left of the window. | Moves to the far left of the window. End Moves to the far right of the window. $ Moves to the far right of the window. g Moves to the top of the window. 1 Moves to the top of the window. G Moves to the bottom of the window. L Moves halfway to the bottom of the scrolling window. l Moves halfway to the top of the scrolling window. Return Exits the scrolling window. Tab Exits the scrolling window. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of lines. 300 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: June, 1995 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/charfile.help0000644000175100001440000000342211733457055017407 0ustar tomusers Cdk has the ability to add in special drawing characters into basic text using format commands. The characters and their respective format commands are listed in the following table. Table of Cdk's Drawing Characters <#UL><#HL(18)><#TT><#HL(5)><#TT><#HL(7)><#UR> <#VL>Description <#VL>Code <#VL>Display<#VL> <#VL>Horizontal Line <#VL>\<\#HL><#VL> <#HL> <#VL> <#VL>Vertical Line <#VL>\<\#VL><#VL> <#VL> <#VL> <#VL>Upper Left Corner <#VL>\<\#UL><#VL> <#UL> <#VL> <#VL>Upper Right Corner<#VL>\<\#UR><#VL> <#UR> <#VL> <#VL>Lower Left Corner <#VL>\<\#LL><#VL> <#LL> <#VL> <#VL>Lower Right Corner<#VL>\<\#LR><#VL> <#LR> <#VL> <#VL>Left Tee <#VL>\<\#LT><#VL> <#LT> <#VL> <#VL>Right Tee <#VL>\<\#RT><#VL> <#RT> <#VL> <#VL>Bottom Tee <#VL>\<\#BT><#VL> <#BT> <#VL> <#VL>Top Tee <#VL>\<\#TT><#VL> <#TT> <#VL> <#VL>Plus <#VL>\<\#PL><#VL> <#PL> <#VL> <#VL>Plus/Minus <#VL>\<\#PM><#VL> <#PM> <#VL> <#VL>Degree <#VL>\<\#DG><#VL> <#DG> <#VL> <#VL>Checker Board <#VL>\<\#CB><#VL> <#CB> <#VL> <#VL>Diamond <#VL>\<\#DI><#VL> <#DI> <#VL> <#VL>Bullet <#VL>\<\#BU><#VL> <#BU> <#VL> <#LL><#HL(18)><#BT><#HL(5)><#BT><#HL(7)><#LR> If you want more than one special character to appear, an optional numeric repeat argument can be used. For example, if you wanted to draw 70 horizontal line characters in a row, typing in \<\#HL> 70 times is excessive. To do this use a numeric repeat value like \<\#HL(70)>. This tells Cdk to draw the horizontal line character 70 times. This is how the line below is drawn. <#HL(70)> Document Created: January, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/graph.help0000644000175100001440000001001706634015407016724 0ustar tomusersPurpose The graph widget allows the programmer to create X/Y graphs easily. Construction Options A graph widget is defined using the following syntax. The variable $graphObject contains the reference to the graph object. $graphObject = new Cdk::Graph ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the whole graph. Xtitle Required Scalar The title of the X axis. Ytitle Required Scalar The title of the Y axis. Height Required Scalar The height of the graph. Width Required Scalar The width of the graph. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Available Methods set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $graphObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Values Required List Ref This is the list of values to display. GraphChars List of Characters Scalar This is a scalar variable containing characters for each plot point. StartAtZero True Scalar This states whether the graph should start at zero or not. Plottype Line Scalar This is the type of graph to draw; line or plot. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $graphObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $graphObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $graphObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $graphObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $graphObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $graphObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $graphObject->getwin(); Default Key Bindings None. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of values 10000 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 1996 cdk-perl-20150928/fulldemo/help/scale.help0000644000175100001440000002767311733451011016721 0ustar tomusersPurpose The scale widget is a widget which allows a user to select an integer value. The scale widget forces the user to choose a value between a predetermined high and low, which eliminates the need to check if the person has typed in a valid value. Construction Options A scale widget is defined using the following syntax. The variable $scaleObject contains a reference to the scale object. $scaleObject = new Cdk::Scale ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label to the scale widget. Low Required Scalar The low value of the scale widget. High Required Scalar The high value of the scale widget. Width Width of High Scalar The width of the field. Inc 1 Scalar The increment value. Fastinc 5 Scalar The accelerated increment value. Start Low Value Scalar The starting value. Fattrib Normal Scalar The attribute of the field value. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a scale widget. $returnValue = $scaleObject->activate (); The variable $returnValue is the value of the field when the widget exits. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $scaleObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $scaleObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Low Required Scalar Sets the low value of the widget. High Required Scalar Sets the high value of the widget. Value Required Scalar Sets the current value of the widget. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $scaleObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $scaleObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $scaleObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $scaleObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $scaleObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $scaleObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $scaleObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $scaleObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $scaleObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $scaleObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $scaleObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $scaleObject->getwin(); Default Key Bindings Key Action Left Arrow Decrements the current value by the standard value. Down Arrow Decrements the current value by the standard value. d Decrements the current value by the standard value. - Decrements the current value by the standard value. Right Arrow Increments the current value by the standard value. Up Arrow Increments the current value by the standard value. u Increments the current value by the standard value. + Increments the current value by the standard value. Prev Page Decrements the current value by the accelerated value. U Decrements the current value by the accelerated value. CTRL-B Decrements the current value by the accelerated value. Next Page Increments the current value by the accelerated value. D Increments the current value by the accelerated value. CTRL-F Increments the current value by the accelerated value. Home Sets the field value to the low value. g Sets the field value to the low value. 0 Sets the field value to the low value. End Sets the field value to the high value. G Sets the field value to the high value. $ Sets the field value to the high value. Return Exits the widget and returns the field value. Tab Exits the widget and returns the field value. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/colors.help0000644000175100001440000001401311733456270017127 0ustar tomusersStarting Colors in Cdk When Cdk is initialized with the Cdk::init() function call, Cdk also initializes the color chart. This saves the programmer the trouble of doing this. When the color table is initialized, 64 color pairs are created. A color pair is a combination of foreground colors and background colors. Using Colors To turn on a color pair use the syntax \<\/XX> where XX is a numeric value from 0 to 64. To turn off a color pair use the syntax \<\!XX> where XX is a numeric value from 0 to 64. The following table lists all the color pairs defined. <#UL><#HL(5)><#TT><#HL(12)><#TT><#HL(12)><#UR> <#VL>Pair <#VL> Foreground <#VL> Background <#VL> <#VL> 0 <#VL> Default <#VL> Default <#VL> <#VL> 1 <#VL> White <#VL> White <#VL> <#VL> 2 <#VL> White <#VL> Red <#VL> <#VL> 3 <#VL> White <#VL> Green <#VL> <#VL> 4 <#VL> White <#VL> Yellow <#VL> <#VL> 5 <#VL> White <#VL> Blue <#VL> <#VL> 6 <#VL> White <#VL> Purple <#VL> <#VL> 7 <#VL> White <#VL> Cyan <#VL> <#VL> 8 <#VL> White <#VL> Black <#VL> <#VL> 9 <#VL> Red <#VL> White <#VL> <#VL> 10 <#VL> Red <#VL> Red <#VL> <#VL> 11 <#VL> Red <#VL> Green <#VL> <#VL> 12 <#VL> Red <#VL> Yellow <#VL> <#VL> 13 <#VL> Red <#VL> Blue <#VL> <#VL> 14 <#VL> Red <#VL> Purple <#VL> <#VL> 15 <#VL> Red <#VL> Cyan <#VL> <#VL> 16 <#VL> Red <#VL> Black <#VL> <#VL> 17 <#VL> Green <#VL> White <#VL> <#VL> 18 <#VL> Green <#VL> Red <#VL> <#VL> 19 <#VL> Green <#VL> Green <#VL> <#VL> 20 <#VL> Green <#VL> Yellow <#VL> <#VL> 21 <#VL> Green <#VL> Blue <#VL> <#VL> 22 <#VL> Green <#VL> Purple <#VL> <#VL> 23 <#VL> Green <#VL> Cyan <#VL> <#VL> 24 <#VL> Green <#VL> Black <#VL> <#VL> 25 <#VL> Yellow <#VL> White <#VL> <#VL> 26 <#VL> Yellow <#VL> Red <#VL> <#VL> 27 <#VL> Yellow <#VL> Green <#VL> <#VL> 28 <#VL> Yellow <#VL> Yellow <#VL> <#VL> 29 <#VL> Yellow <#VL> Blue <#VL> <#VL> 30 <#VL> Yellow <#VL> Purple <#VL> <#VL> 31 <#VL> Yellow <#VL> Cyan <#VL> <#VL> 32 <#VL> Yellow <#VL> Black <#VL> <#VL> 33 <#VL> Blue <#VL> White <#VL> <#VL> 34 <#VL> Blue <#VL> Red <#VL> <#VL> 35 <#VL> Blue <#VL> Green <#VL> <#VL> 36 <#VL> Blue <#VL> Yellow <#VL> <#VL> 37 <#VL> Blue <#VL> Blue <#VL> <#VL> 38 <#VL> Blue <#VL> Purple <#VL> <#VL> 39 <#VL> Blue <#VL> Cyan <#VL> <#VL> 40 <#VL> Blue <#VL> Black <#VL> <#VL> 41 <#VL> Purple <#VL> White <#VL> <#VL> 42 <#VL> Purple <#VL> Red <#VL> <#VL> 43 <#VL> Purple <#VL> Green <#VL> <#VL> 44 <#VL> Purple <#VL> Yellow <#VL> <#VL> 45 <#VL> Purple <#VL> Blue <#VL> <#VL> 46 <#VL> Purple <#VL> Purple <#VL> <#VL> 47 <#VL> Purple <#VL> Cyan <#VL> <#VL> 48 <#VL> Purple <#VL> Black <#VL> <#VL> 49 <#VL> Cyan <#VL> White <#VL> <#VL> 50 <#VL> Cyan <#VL> Red <#VL> <#VL> 51 <#VL> Cyan <#VL> Green <#VL> <#VL> 52 <#VL> Cyan <#VL> Yellow <#VL> <#VL> 53 <#VL> Cyan <#VL> Blue <#VL> <#VL> 54 <#VL> Cyan <#VL> Purple <#VL> <#VL> 55 <#VL> Cyan <#VL> Cyan <#VL> <#VL> 56 <#VL> Cyan <#VL> Black <#VL> <#VL> 57 <#VL> Black <#VL> White <#VL> <#VL> 58 <#VL> Black <#VL> Red <#VL> <#VL> 59 <#VL> Black <#VL> Green <#VL> <#VL> 60 <#VL> Black <#VL> Yellow <#VL> <#VL> 61 <#VL> Black <#VL> Blue <#VL> <#VL> 62 <#VL> Black <#VL> Purple <#VL> <#VL> 63 <#VL> Black <#VL> Cyan <#VL> <#VL> 64 <#VL> Black <#VL> Black <#VL> <#LL><#HL(5)><#BT><#HL(12)><#BT><#HL(12)><#LR> <#HL(70)> Document Created: November, 1995 Document Revised: January, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/general.help0000644000175100001440000001411211733356503017241 0ustar tomusersPreamble: From Glover's original text: The Cdk curses widget set was written by myself (Mike Glover). It started as a small pet project to test how compatible my new Linux box was to other flavours of Unix. As it turned out I discovered Ncurses, and played with that a whole lot. This constant playing with Ncurses created what is currently known as Cdk. Cdk has evolved many times since its first inception and has evolved to what you are currently looking at. One day I finally told myself that the C version was 'done'. I quickly looked in other directions for the Cdk widget set. One day I told myself: "Cdk would be really cool if it was interpreted instead of compiled! " Enter Mike's love of Perl. It finally dawned on me that I could extend Perl5 to include the Cdk widget set. So I started to play with Perl5. The more I played with Perl5, the more I really started to like the additions. I finally read the manual pages on how to extend Perl5 to include other libraries. As time passed I entrenched myself deeper into extending Perl5 to what I currently call the Cdk Perl5 extension. After about 2 months of work, Cdk was finally extended into Perl5. (crowd cheers...) Info: I'm sure the first question being asked is, 'What does Cdk stand for?'. In response I say : (fanfare please) Curses Development Kit There are currently 22 widgets available in Cdk, with more coming. What they are and what they do is in the following table. <#UL><#HL(14)><#TT><#HL(52)><#UR> <#VL> Widget Name <#VL>Purpose <#VL> <#VL>Alphalist <#VL>Provides a list of words which the user can select <#VL> <#VL> <#VL>from. Allows you to narrow the search by entering <#VL> <#VL> <#VL>a few initial characters of the words being <#VL> <#VL> <#VL>sought after to narrow the search. <#VL> <#VL>Buttonbox <#VL>Creates a widget with numerous buttons. <#VL> <#VL>Calendar <#VL>Creates a simple calendar widget. <#VL> <#VL>Dialog <#VL>Prompts the user with a message, and the user <#VL> <#VL> <#VL>can pick an answer from the buttons provided. <#VL> <#VL>Entry <#VL>Allows the user to enter information. <#VL> <#VL>File Selector <#VL>A file selector built from Cdk base widgets. <#VL> <#VL> <#VL>This example shows how to create more complicated <#VL> <#VL> <#VL>widgets using the Cdk widget library. <#VL> <#VL>Graph <#VL>Draws a graph. <#VL> <#VL>Histogram <#VL>Draws a histogram. <#VL> <#VL>Item List <#VL>Creates a pop up field which allows the user to <#VL> <#VL> <#VL>select one of several choices in a small field. Very<#VL> <#VL> <#VL>useful for things like days of the week or month <#VL> <#VL> <#VL>names. <#VL> <#VL>Label <#VL>Displays messages in a pop up box, or the label can <#VL> <#VL> <#VL>be considered part of the screen. <#VL> <#VL>Marquee <#VL>Displays a message in a scrolling marquee. <#VL> <#VL>Matrix <#VL>Creates a complex matrix with lots of options. <#VL> <#VL>Menu <#VL>Creates a pull-down menu interface. <#VL> <#VL>Multiple Line <#VL>A multiple line entry field. Very useful for long <#VL> <#VL>Entry Field <#VL>fields. (like a description field) <#VL> <#VL>Radio List <#VL>Creates a radio button list. <#VL> <#VL>Scale <#VL>Creates a numeric scale. Allows a user to pick a <#VL> <#VL> <#VL>numeric value and restrict them to a range of <#VL> <#VL> <#VL>values. <#VL> <#VL>Scrolling List<#VL>Creates a scrolling list/menu list. <#VL> <#VL>Scrolling <#VL>Creates a scrolling log file viewer. Can add <#VL> <#VL>Window <#VL>information into the window while its running. <#VL> <#VL> <#VL>A good widget for displaying the progress of <#VL> <#VL> <#VL>something. (akin to a console window) <#VL> <#VL>Selection List<#VL>Creates a multiple option selection list. <#VL> <#VL>Slider <#VL>Akin to the Scale widget but provides a visual <#VL> <#VL> <#VL>representation of the current numeric value. <#VL> <#VL>Template <#VL>Creates a entry field with character sensitive <#VL> <#VL> <#VL>positions. Used for pre-formatted fields like dates <#VL> <#VL> <#VL>and phone numbers. <#VL> <#VL>Viewer <#VL>Creates an information viewer. You are currently <#VL> <#VL> <#VL>using the viewer by the way. <#VL> <#LL><#HL(14)><#BT><#HL(52)><#LR> Each help subsection outlines certain features of each widget. They are broken up into the following sections: Purpose Construction Options Available Methods Key bindings Tips & Tricks Physical Restrictions Example Use Of The Widget The documentation supplied with the demo is more than enough information to get any user off the ground and flying with the Cdk Perl5 extension. Have fun. Just in case, there is a subdirectory named examples which provides individual examples of each Cdk widget. ttfn, Mike <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: January, 1996 Document Revised: June, 1996 Document Revised: April, 1997 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/binding.help0000644000175100001440000000116106634015407017235 0ustar tomusersAll interactive widgets have the ability to bind specific keys to specific functions. This allows programmers to customize the widgets to perform specific actions when a key is hit. The following example demonstrates how to call the bind function. $widget->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. Example Use Of The Bind Method <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 cdk-perl-20150928/fulldemo/help/display.help0000644000175100001440000000722211733456531017277 0ustar tomusersThere are a number of display types and position types that should be explained. These names can be used to both position the widget itself and the contents within the widget. Widget Positioning There are five pre-defined position names that help location either a widget or a widgets title, or any other element of a widget. They are listed in the table below. <#UL><#HL(8)><#TT><#HL(47)><#UR> <#VL>Name <#VL>Purpose <#VL> <#VL>TOP <#VL>Positions a widget to the top of the screen. <#VL> <#VL>BOTTOM <#VL>Positions a widget to the bottom of the screen.<#VL> <#VL>LEFT <#VL>Positions a widget to the left of the screen. <#VL> <#VL>RIGHT <#VL>Positions a widget to the right of the screen. <#VL> <#VL>CENTER <#VL>Positions a widget to the center of the screen.<#VL> <#LL><#HL(8)><#BT><#HL(47)><#LR> If the names are not used, then a numeric value can be used for location. Entry Field Display Types The entry fields, Matrix, Entry and Multiple Line Entry, can define the type of input defined. They are specified with the following pre-defined display type variables. <#UL><#HL(9)><#TT><#HL(40)><#UR> <#VL>Name <#VL>Result <#VL> <#VL>CHAR <#VL> Character only. <#VL> <#VL>HCHAR <#VL> Hidden Character Only. <#VL> <#VL>INT <#VL> Integer only. <#VL> <#VL>HINT <#VL> Hidden Integer Only. <#VL> <#VL>MIXED <#VL> Mixed Input. <#VL> <#VL>HMIXED <#VL> Hidden Mixed Input. <#VL> <#VL>UCHAR <#VL> Upper Case Character Input. <#VL> <#VL>LCHAR <#VL> Lower Case Character Input. <#VL> <#VL>UHCHAR <#VL> Upper Case Hidden Character Input. <#VL> <#VL>LHCHAR <#VL> Lower Case Hidden Character Input. <#VL> <#VL>UMIXED <#VL> Upper Case Mixed Input. <#VL> <#VL>LMIXED <#VL> Lower Case Mixed Input. <#VL> <#VL>UHMIXED <#VL> Upper Case Hidden Mixed Input. <#VL> <#VL>LHMIXED <#VL> Lower Case Hidden Mixed Input. <#VL> <#VL>VIEWONLY <#VL> View only field. (uneditable) <#VL> <#LL><#HL(9)><#BT><#HL(40)><#LR> NOTE When the above says Upper/Lower Case that means all the input auto-magically gets mapped to Upper/Lower case. When it says hidden it means the input is taken and stored; only a . is presented for each key hit. This is useful for password or hidden entries. Special Types Special types exist for certain widgets. Below is a list of the current widgets that have a special type, its name and description. <#UL<#HL(10)><#TT><#HL(11)><#TT><#HL(44)><#UR> <#VL>Widget <#VL>Type Name <#VL>Result <#VL> <#VL>Histogram <#VL>NONE <#VL>Turns off the statistics for the histogram. <#VL> <#VL> <#VL>PERCENT <#VL>Sets the statistics to a percentage. <#VL> <#VL> <#VL>REAL <#VL>Sets the statistics to the real value. <#VL> <#VL> <#VL>HORIZONTAL <#VL>Specifies a horizontal histogram. <#VL> <#VL> <#VL>VERTICAL <#VL>Specifies a vertical histogram. <#VL> <#VL>Graph <#VL>PLOT <#VL>Specifies the graph will draw a plot graph. <#VL> <#VL> <#VL>LINE <#VL>Specifies the graph will draw a line graph. <#VL> <#LL<#HL(10)><#BT><#HL(11)><#BT><#HL(44)><#LR> <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/entry.help0000644000175100001440000003026511733450514016771 0ustar tomusersPurpose The Cdk Entry widget allows the user to type in input within a widget. The entry field has a solid basis of editing features. Construction Options A entry widget is defined using the following syntax. The variable $entryObject contains the reference to the entry object. $entryObject = new Cdk::Entry ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label of the entry field. Max Required Scalar The maximum length of the value entered. Min 0 Scalar The minimum length of the value entered. Width Required Scalar The width of the field on the screen. Filler . Scalar The default field character. Dtype Mixed Scalar The display type. (See Display Help) Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Lpos Left Scalar This is the position of the label in the widget. Fieldattr Normal Scalar The attribute of the characters typed in. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. $returnValue = $entryObject->activate (); The variable $returnValue contains a scalar value of what was typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $entryObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the entry field. $entryObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Value Required Scalar Sets the value of the entry field. Min Same as set value Scalar Sets the size of the minimum length of the information typed in. Max Same as set value Scalar Sets the size of the maximum length of the information typed in. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $entryObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $entryObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $entryObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $entryObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $entryObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $entryObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $entryObject->erase (); clean This method cleans the information from inside the entry object. The following example demonstrates how to call the clean method. $entryObject->clean(); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $entryObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $entryObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $entryObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $entryObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $entryObject->getwin(); Default Key Bindings Key Action Left Arrow Moves the cursor one character to the left. Right Arrow Moves the cursor one character to the right. Delete Deletes the character to the left of the cursor. Backspace Deletes the character to the left of the cursor. Return Exits the widget and returns a scalar representing the informarion which was typed into the field. Tab Exits the widget and returns a scalar representing the informarion which was typed into the field. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks The label can be put on the left, right, top or bottom of the field, allowing for a more dynamic placement of the label itself. Setting the Dtype variable to a hidden type creates an entry field suitable for a password. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/postprocess.help0000644000175100001440000000412511733451011020201 0ustar tomusersThe postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $alphalistObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $widget->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> The following code segment demonstrates how to use the post-process method. <#HL(70)> Document Created: July, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/menu.help0000644000175100001440000002060011733451011016555 0ustar tomusersPurpose The menu widget allows the programmer to create a pull-down menu widget. Complete with sub-menu items. Construction Options A menu widget is defined using the following syntax. The variable $menuObject contains a reference to the menu object. $menuObject = new Cdk::Menu ( options ); The options are defined in the following table. Option Default Value Type Purpose Menulist Required Array Ref This is the menu title list. Menuloc Required Array Ref This is the menu title location list. Tattrib Reverse Scalar This is the attribute of the currently highlighted menu title. SubTattrib Reverse Scalar This is the attribute of the currently highlighted menu item. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a menu widget. $returnValue = $menuObject->activate (); The variable $returnValue is an integer value which represents the selected item. The calculation of this value is determined as follows: (100 * Current Title ) + Current Subtitle To extract the correct menu item from this value use the following formula: $menuList = int ( $returnValue / 100 ); $menuItem = ($returnValue % 100 ); You can then dereference the string value from the array using the above two calculations. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $menuObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $menuObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $menuObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $menuObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $menuObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $menuObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $menuObject->draw (); erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $menuObject->erase (); Default Key Bindings Key Action Left Arrow Moves to the menu list on the left. Right Arrow Moves to the menu list on the right. Up Arrow Moves the cursor up one menu item. Down Arrow Moves the cursor up one menu item. Space Moves the cursor up down menu item. Return Selects the current menu item. Tab Moves to the menu list on the right. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Max number of menu items. 30 Max number of sub-menu items. 98 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/viewer.help0000644000175100001440000002025211733450433017124 0ustar tomusersPurpose This widget provides a way to view any text file. The text file can contain Cdk display commands, or be a regular text file. Construction Options A viewer widget is defined using the following syntax. The variable $viewerObject contains a reference to the viewer object. $viewerObject = new Cdk::Viewer ( options ); The options are defined in the following table. Option Default Value Type Purpose Buttons Required Array Ref This is an array of the button labels. Height Required Scalar The height of the window. Width Required Scalar The width of the window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a viewer widget. $returnValue = $viewerObject->activate ( options ); Option Default Value Type Purpose Title Required Scalar The title of the viewer widget. Info Required Array Ref The information contained inside the viewer. Highlight Reverse Scalar The attribute of the currently highlighted button. Interp True Scalar This is a Boolean flag specifying whether or not the file being read in should have the contents interpreted for the Cdk display codes. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. The variable $returnValue is the numeric value of the button chosen. The value starts at 0 and goes up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $viewerObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $viewerObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Reverse Scalar The attribute of the currently highlighted button. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $viewerObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $viewerObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $viewerObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $viewerObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $viewerObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $viewerObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $viewerObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $viewerObject->getwin(); Default Key Bindings Key Action Tab Selects the next button. Up Arrow Moves the cursor to one line up. Down Arrow Moves the cursor to one line down. Tab Moves the cursor to one line down. Right Arrow Scrolls the view one character to the right. Left Arrow Scrolls the view list one character to the left. Previous Page Moves one screen backwards. CTRL-B Moves one screen backwards Next Page Moves one screen forwards. Space Moves one screen forwards. CTRL-F Moves one screen forwards. g Moves to the top of the viewer. 1 Moves to the top of the viewer. G Moves to the bottom of the viewer. End Scrolls complete viewer as far left as possible. $ Scrolls complete viewer as far left as possible. Home Scrolls complete viewer as far right as possible. | Scrolls complete viewer as far right as possible. L Moves halfway to the bottom of the viewer. l Moves halfway to the top of the viewer. ? Searches upwards for given text. / Searches downwards for given text. n Performs last search, in the same direction. : Jumps to a given line. i Displays information about the current file in viewer. s Displays information about the current file in viewer. Return Exits the widget and returns the current selection. Tab Exits the widget and returns the current selection. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of lines. 10000 Maximum number of buttons. 50 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/scroll.help0000644000175100001440000002650611733451011017122 0ustar tomusersPurpose The scroll widget allows the user to add a scrolling list in their script. Construction Options A scroll widget is defined using the following syntax. The variable $scrollObject contains a reference to the scroll object. $scrollObject = new Cdk::Radio ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the scroll list. List Required Array Ref The list of items in the list. Height Required Scalar The height of the scroll list. Width Required Scalar The width of the scroll list. Numbers False Scalar Adds numbers to the items in the list. Highlight Reverse Scalar The attribute of the currently highlighted item. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a scroll widget. $returnValue = $scrollObject->activate (); The variable $returnValue will contain a integer value representing the number of the chosen item. The numbers start at zero and go up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $scrollObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $scrollObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Required Scalar The attribute of the currently highlighted item. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $scrollObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $scrollObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $scrollObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $scrollObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $scrollObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $scrollObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $scrollObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $scrollObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $scrollObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $scrollObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $scrollObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $scrollObject->getwin(); Default Key Bindings Key Action Up Arrow Moves the cursor to one item up. Down Arrow Moves the cursor to one item down. Right Arrow Scrolls the whole list one character to the right. Left Arrow Scrolls the whole list one character to the left. Previous Page Moves the complete list one screen backwards. CTRL-B Moves the complete list one screen backwards Next Page Moves the complete list one screen forwards. CTRL-F Moves the complete list one screen forwards. g Moves to the top of the list. 1 Moves to the top of the list. G Moves to the bottom of the list. $ Scrolls complete list as far left as possible. | Scrolls complete list as far right as possible. Return Exits the widget and returns the current selection. Tab Exits the widget and returns the current selection. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks You can make the scrolling list look like a menu list by turning on the numbers option and creating the window the size of the list. This works best if the list isn't too long so the whole list can be shown. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/concepts.help0000644000175100001440000000340706634015407017446 0ustar tomusers There are a few concepts that have to be understood before effecitively writing applications using the Perl5 Cdk extension. This document will try to clear the air on any 'funny' behavior you may experience using Cdk. Screens Cdk uses a concept of a screen. When a widget is created it automagically registers itself with the screen. When it dies it automagically removes itself from the screen. If at any time you refresh the screen, and a widget appears that you don't want, it means it is still registered. Stricter Variable Localization If you want a widget to remove itself from the screen, you can use the Perl command undef to destroy the widget object by hand. The easiest method to do this is to use strict variable localization. (ie: only have the widget variables exist as long as you need them to) Widget Mapping Widget mapping is performed by the Cdk function Cdk::refreshCdkScreen(). This function remaps all the widgets it knows about. This almost eradicates the need to call the object methods draw and erase. These are included to remain as consistent and flexible as the C version. Character Input To get character input yourself, the function Cdk::getch() was added. Though it is not meant to replace the standard method of getting characters in Perl, it can be used still. The main reason why I included this was to be consistent with Curses. Raw Mode You can put the terminal into raw mode by calling Cdk::raw(). This allows you to interrupt special control characters like c, d and z. To get out of raw mode call Cdk::noraw(). This will restore the terminal back. <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 cdk-perl-20150928/fulldemo/help/label.help0000644000175100001440000000762306634015407016713 0ustar tomusersPurpose The label widget allows a programmer to create a message box. This message box can be part of the screen or a temporary pop up message box. Construction Options A label widget is defined using the following syntax. The variable $labelObject contains the reference to the label object. $labelObject = new Cdk::Label ( options ); The options are defined in the following table. Option Default Value Type Purpose Mesg Required Array Ref This is the contents of the message inside the window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $labelObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $labelObject->erase (); wait This method freezes until a key has been hit. This allows the user to put a message inside the label telling the user to hit any key when ready. The following example demonstrates how to call the wait method. $labelObject->wait( options ); The options are defined in the following table. Option Default Value Type Purpose Key NULL Scalar Tells the object which key to hit to exit the object. raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $labelObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $labelObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $labelObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $labelObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $labelObject->getwin(); Tips & Tricks A title can be added to the label widget by using the formatting commands available with Cdk. Physical Restrictions Restriction Value Maximum Rows 300 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 cdk-perl-20150928/fulldemo/help/calendar.help0000644000175100001440000002556211733451011017376 0ustar tomusersPurpose The Cdk calendar widget is a simple little widget which allows a user to play with a calendar. Construction Options The calendar widget is defined using the following syntax. The variable $calendarObject contains the reference to the entry object. $calendarObject = new Cdk::Calendar ( options ); The options are defined in the following table. Option Default Value Type Purpose Day The current day Scalar The day of the calendar. of the month. Month The current month Scalar The month of the calendar. Year The current year Scalar The year of the calendar. Dattrib Normal Scalar The attribute of the days. Mattrib Normal Scalar The attribute of the month name. Yattrib Normal Scalar The attribute of the year. Highlight Reverse Scalar The highlight attribute of the cursor. Filler . Scalar The default field character. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. ($day, $month, $year) = $calendarObject->activate (); The variables $day, $month, $year is the date of the calendar when it exited. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $calendarObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> setDate Sets the current date of the calendar field. $calendarObject->setDate ( options ); The options are defined in the following table. Option Default Value Type Purpose Day Required Scalar The day of the calendar. Month Required Scalar The month of the calendar. Year Required Scalar The year of the calendar. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $calendarObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $calendarObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $alphalistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $calendarObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $alphalistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $calendarObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $calendarObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $calendarObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $calendarObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $calendarObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $calendarObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $calendarObject->getwin(); Default Key Bindings Since this widget is 'driven' by the entry field, the default key bindings of the entry field apply to this widget. There are however extra bindings which have been applied. They are as follows: Key Action TAB Tries to complete the word in the entry field. Key Up Scrolls the list one item backward. Page Up Scrolls the list one page backward. CTRL-B Scrolls the list one page backward. Key Down Scrolls the list one line forward. Page Down Scrolls the list one page forward. CTRL-F Scrolls the list one page forward. Return Returns what is currently displayed in the entry field. Escape Exits the widget and returns undef. Tips & Tricks None. Physical Restrictions Same as the scrolling list. Example Use Of The Widget <#HL(70)> Document Created: June, 1996 Document Revised: July, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/alphalist.help0000644000175100001440000002627411733450034017613 0ustar tomusersPurpose The Cdk alphalist widget allows the user to select an item in a list. This widget allows the user to type in letters to refine and narrow the search. When a character is typed into the entry field, the scrolling list looks for the first word which matches the string in the entry field. You can continue to narrow the search by typing in more letters. Construction Options The alphalist widget is defined using the following syntax. The variable $alphalistObject contains the reference to the entry object. $alphalistObject = new Cdk::Alphalist ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar This is the label of the widget. List Required Array Ref This is the list of words to choose from. Height Required Scalar The height of the widget. Width Required Scalar The width of the widget. Highlight Reverse Scalar The highlight attribute of the scrolling list. Filler . Scalar The default field character. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. $returnValue = $alphalistObject->activate (); The variable $returnValue contains a scalar value of what was typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $alphalistObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the entry field. $alphalistObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose List Required Array Ref This is the list of words to choose from. Highlight Reverse Scalar The highlight attribute of the scrolling list. Filler . Scalar The default field character. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $alphalistObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $alphalistObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $alphalistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $alphalistObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $alphalistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $alphalistObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $alphalistObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $alphalistObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $alphalistObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $alphalistObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $alphalistObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $alphalistObject->getwin(); Default Key Bindings Since this widget is 'driven' by the entry field, the default key bindings of the entry field apply to this widget. There are however extra bindings which have been applied. They are as follows: Key Action TAB Tries to complete the word in the entry field. Key Up Scrolls the list one item backward. Page Up Scrolls the list one page backward. CTRL-B Scrolls the list one page backward. Key Down Scrolls the list one line forward. Page Down Scrolls the list one page forward. CTRL-F Scrolls the list one page forward. Return Returns what is currently displayed in the entry field. Escape Exits the widget and returns undef. Tips & Tricks None. Physical Restrictions Same as the scrolling list. Example Use Of The Widget <#HL(70)> Document Created: June, 1996 Document Revised: July, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/preprocess.help0000644000175100001440000000441511733451011020004 0ustar tomusersThe preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $alphalistObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $widget->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The following code segment demonstrates this principle. <#HL(70)> Document Created: July, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/special.help0000644000175100001440000000215411733456610017247 0ustar tomusersSpecial Display Keywords There are a number of special keywords which can be added into any string in Cdk which will highlight characters. Cdk has the ability to BOLD, UNDERLINE, Reverse, Blink, Standout, Dim, and many colors To turn on highlighting the format command \<\/XX> is used. To turn off formatting the command \<\!XX> is used. The following table lists all of the display attributes available through Cdk, and how to turn them on. <#UL><#HL(8)><#TT><#HL(11)><#UR> <#VL>Command <#VL> Attribute <#VL> <#VL>\<\/N> <#VL> Normal <#VL> <#VL>\<\/B> <#VL> Bold <#VL> <#VL>\<\/R> <#VL> Reverse <#VL> <#VL>\<\/U> <#VL> Underline <#VL> <#VL>\<\/K> <#VL> Blink <#VL> <#VL>\<\/S> <#VL> Standout <#VL> <#VL>\<\/D> <#VL> Dim <#VL> <#LL><#HL(8)><#BT><#HL(11)><#LR> <#HL(70)> Document Created: January, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/mentry.help0000644000175100001440000002715511733451011017143 0ustar tomusersPurpose The mentry widget is a multiple line entry field. This allows the programmer to put widgets in the scripts which have long or lengthy fields. This is very appropriate for a description field. Construction Options A mentry widget is defined using the following syntax. The variable $mentryObject contains a reference to the mentry object. $mentryObject = new Cdk::Mentry ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar This is the label to the widget. Width Required Scalar This is the field width. Prows Required Scalar This specifies the number of physical rows to the widget. Lrows Required Scalar This specifies the number of logical rows to the widget. Min 0 Scalar The minimum number of characters that need to be entered. Dtype Mixed Scalar This is the display type of the entry field. (see display help for more information) Filler . Scalar This is the default character in the field. Fillattr Normal Scalar This sets the attributes of the filler character. Lpos Left Scalar This is the position of the label. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a mentry widget. $returnValue = $mentryObject->activate (); The variable $returnValue will contain the value typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $mentryObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $mentryObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Value Required Scalar Sets the value in the entry field. Min Same as set value Scalar Sets the minimum number of characters which need to be entered. Box True Scalar Changes the Boolean value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $mentryObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $mentryObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $mentryObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $mentryObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $mentryObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $mentryObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $mentryObject->erase (); clean This method cleans the information from the entry field. The following example demonstrates how to call the clean method. $mentryObject->clean(); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $mentryObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $mentryObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $mentryObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $mentryObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $mentryObject->getwin(); Default Key Bindings Key Action Left Arrow Moves the cursor left one character. Right Arrow Moves the cursor right one character. Down Arrow Moves the cursor up down row. Up Arrow Moves the cursor up one row. Backspace Deletes the character to the left of the cursor. Delete Deletes the character to the left of the cursor. Return Exits the widget and returns the contents of the field. Tab Exits the widget and returns the contents of the field. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks The label can be put on the left, right, top or bottom of the field, allowing for a more dynamic placement of the label itself. Setting the Dtype variable to a hidden type creates an entry field suitable for a password. Physical Restrictions Restriction Value Maximum number of rows 1000 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/slider.help0000644000175100001440000003015411733451011017100 0ustar tomusersPurpose The slider widget is a widget which allows a user to select an integer value. The slider widget forces the user to choose a value between a predetermined high and low, which eliminates the need to check if the person has typed in a valid value. The difference between this widget and the slider widget is this widget displays a bar which represents the current value. Construction Options A slider widget is defined using the following syntax. The variable $sliderObject contains a reference to the slider object. $sliderObject = new Cdk::Slider ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label to the slider widget. Low Required Scalar The low value of the slider widget. High Required Scalar The high value of the slider widget. Width Required Scalar The width of the field. Inc 1 Scalar The increment value. Fastinc 5 Scalar The accelerated increment value. Start Low Value Scalar The starting value. Filler Reverse Space Scalar The character which will be used for the scale. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Lpos Left Scalar This is the position of the label in the widget. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a slider widget. $returnValue = $sliderObject->activate (); The variable $returnValue is the value of the field when the widget exits. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $sliderObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $sliderObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Low Required Scalar Sets the low value of the widget. High Required Scalar Sets the high value of the widget. Value Required Scalar Sets the current value of the widget. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $sliderObject->bind ( options ); The options are defined in the following table. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $sliderObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $sliderObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $sliderObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $sliderObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $sliderObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $sliderObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $sliderObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $sliderObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $sliderObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $sliderObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $sliderObject->getwin(); Default Key Bindings Key Action Left Arrow Decrements the current value by the standard value. Down Arrow Decrements the current value by the standard value. d Decrements the current value by the standard value. - Decrements the current value by the standard value. Right Arrow Increments the current value by the standard value. Up Arrow Increments the current value by the standard value. u Increments the current value by the standard value. + Increments the current value by the standard value. Prev Page Decrements the current value by the accelerated value. U Decrements the current value by the accelerated value. CTRL-B Decrements the current value by the accelerated value. Next Page Increments the current value by the accelerated value. D Increments the current value by the accelerated value. CTRL-F Increments the current value by the accelerated value. Home Sets the field value to the low value. g Sets the field value to the low value. 0 Sets the field value to the low value. End Sets the field value to the high value. G Sets the field value to the high value. $ Sets the field value to the high value. Return Exits the widget and returns the field value. Tab Exits the widget and returns the field value. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/selection.help0000644000175100001440000002676411733451011017617 0ustar tomusersPurpose The selection widget allows the user to add a selection list in their script. Construction Options A selection widget is defined using the following syntax. The variable $selectionObject contains a reference to the selection object. $selectionObject = new Cdk::Radio ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the selection list. List Required Array Ref The list of items in the list. Choices Required Array Ref The list of choices for each item in the list. Height Required Scalar The height of the selection list. Width Required Scalar The width of the selection list. Highlight Reverse Scalar The attribute of the currently highlighted item. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a selection widget. $returnValue = $selectionObject->activate (); The variable $returnValue will contain a integer value representing the number of the chosen item. The numbers start at zero and go up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $selectionObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $selectionObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Defaults Required Array Ref A list of values stating which items are to be given which value. Highlight Required Scalar The attribute of the currently highlighted item. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $selectionObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $selectionObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $selectionObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $selectionObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $selectionObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $selectionObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $selectionObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $selectionObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $selectionObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $selectionObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $selectionObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $selectionObject->getwin(); Default Key Bindings Key Action Space Cycles the selection for the current item, to the next selection. Up Arrow Moves the cursor to one item up. Down Arrow Moves the cursor to one item down. Right Arrow Scrolls the whole list one character to the right. Left Arrow Scrolls the whole list one character to the left. Previous Page Moves the complete list one screen backwards. CTRL-B Moves the complete list one screen backwards Next Page Moves the complete list one screen forwards. CTRL-F Moves the complete list one screen forwards. g Moves to the top of the list. 1 Moves to the top of the list. G Moves to the bottom of the list. $ Scrolls complete list as far left as possible. | Scrolls complete list as far right as possible. Return Exits the widget and returns the current selection. Tab Exits the widget and returns the current selection. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks Calling the set method with the Defaults parameter will set the values of the selection list before activation. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/template.help0000644000175100001440000002775311733451011017444 0ustar tomusersPurpose The template widget allows the programmer to present a user with an entry field which has a strict format requirement. This widget is best used to retrieve date fields or phone numbers, both of which have a specific format. Construction Options A template widget is defined using the following syntax. The variable $templateObject contains a reference to the template object. $templateObject = new Cdk::Template ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar This is the label of the widget. Plate Required Scalar This is the format plate for the entry field. The accepted characters for the plate are listed below. Overlay Required Scalar This is the default background of the template field. For a date field it could be DD/MM/YYYY Lpos Center Scalar This is the position of the label in the widget. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This boolean states whether the dialog box will have a shadow on the box. The Plate option takes a specific format to state which type of character will be accepted at each location. The following table lists the characters and what they mean. Character Meaning # Accepts numeric values only. (0-9) A Alphabetic characters only. (a-zA-Z) C Alphabetic characters only. This will force the character to upper case. c Alphabetic characters only. This will force the character to lower case. X Mixed upper case characters. x Mixed lower case characters. Anything else. Used as plate information. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a template widget. $returnValue = $templateObject->activate (); The variable $returnValue is the string value of what was typed in the field. It does not have the overlay characters mixed in with it. This means that if a date field were used and the plate looked like ##/##/#### and the overlay looked like DD-MM-YYYY and the date June 1 1968 were typed in, then the resultant value would be 01061968 To mix the field value and the overlay, call the mix method. Calling the mix method on the above example would result in 01-06-1968 inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $templateObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $templateObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Value Required Scalar Sets the value of the field. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $templateObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $templateObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $templateObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $templateObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $templateObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $templateObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $templateObject->erase (); mix This method returns a mixed value of the template field value and the overlay. The following example demonstrates how to call the mix method. $mixedValue = $templateObject(); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $templateObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $templateObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $templateObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $templateObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $templateObject->getwin(); Default Key Bindings Key Action Delete Deletes the last character in the field. Backspace Deletes the last character in the field. Return Leaves the widget and returns the field value. Tab Leaves the widget and returns the field value. CTRL-N Leaves the widget and returns the field value. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget #!/usr/local/bin/perl # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create the template object. $template = new Cdk::Template ( 'Label' => 'Type in a date:', 'Plate' => '## ## ####', 'Overlay' => 'DD-MM-YYYY'); # Activate the widget. $date = $template->activate(); $mixedDate = $template->mix(); # Exit Cdk. Cdk::end(); # Print out the info. print "\n\n\n"; print "Without Overlay Mixing: $date\n"; print "With Overlay Mixing : $mixedDate\n"; <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/future.help0000644000175100001440000000103206634015407017132 0ustar tomusersThe future of Cdk has in it a number of additions. Here is a composite list of things to come: General Would like to have a captive shell, so commands can be spawned via Cdk. This would allow Cdk to run commands and trap the output. I am presently working on creating a tree widget. New Features/Widgets Possible Editor to place widgets... Full range of drawing routines. <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: June, 1996 cdk-perl-20150928/fulldemo/help/radio.help0000644000175100001440000002674611733451011016730 0ustar tomusersPurpose The radio widget allows the programmer to create a radio list. The radio widget acts very similar to the scrolling list. In fact the radio list is a scrolling list, just with the extra feature of a visual selection. Construction Options A radio widget is defined using the following syntax. The variable $radioObject contains a reference to the radio object. $radioObject = new Cdk::Radio ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the radio list. List Required Array Ref The list of items in the list. Height Required Scalar The height of the radio list. Width Required Scalar The width of the radio list. Choice X Scalar The choice character. Cattr Normal Scalar The attribute of the choice character. Default 0 Scalar The default item in the list. Highlight Reverse Scalar The attribute of the currently highlighted item. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a radio widget. $returnValue = $radioObject->activate (); The variable $returnValue will contain a integer value representing the number of the chosen item. The numbers start at zero and go up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $radioObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $radioObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Required Scalar The attribute of the currently highlighted item. Choice Required Scalar The choice character. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $radioObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $radioObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $radioObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $radioObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $radioObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $radioObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $radioObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $radioObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $radioObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $radioObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $radioObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $radioObject->getwin(); Default Key Bindings Key Action Up Arrow Moves the cursor to one item up. Down Arrow Moves the cursor to one item down. Tab Moves the cursor to one item down. Right Arrow Scrolls the whole list one character to the right. Left Arrow Scrolls the whole list one character to the left. Previous Page Moves the complete list one screen backwards. CTRL-B Moves the complete list one screen backwards Next Page Moves the complete list one screen forwards. CTRL-F Moves the complete list one screen forwards. g Moves to the top of the list. 1 Moves to the top of the list. G Moves to the bottom of the list. $ Scrolls complete list as far left as possible. | Scrolls complete list as far right as possible. Space Selects the current item. Return Exits the widget and returns the current selection. CTRL-R Refreshes the screen. Tips & Tricks Setting the default value sets that value on when the radio list is activated. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/debug.help0000644000175100001440000000243706634015407016720 0ustar tomusersThe Cdk Perl5 extension has a somewhat powerful diagnostics element associated with it. It really needs it because of the behavior of Cdk. Cdk was written using curses; and one of the behaviors set when using Cdk is that noecho is turned on. This means that whenever a character is printed to the screen using print or printf they won't show up. This means another method of diagnostics must be provided. Cdk::Diag Module: The Cdk::Diag module currently only has one method: Log. It writes to the log file if diagnostics has been turned on. If diagnostics has been turned on, the performance of the Cdk Perl script will take a severe performance hit, depending on how many diagnostics are turned on. Turning on the Diagnostics: To turn the diagnostics on, there is an environment variable called CDKDIAG which needs to be set. This currently only really supports one value: ALL. There is work being done right now so diagnostics can be turned on by method name, class name, required values only, default values only, methods called.... Diagnostic File: The default diagnostic filename is cdkdiag.log but can be changed by setting the environment variable CDKLOGFILE. <#HL(70)> Document Created: June, 1995 cdk-perl-20150928/fulldemo/help/matrix.help0000644000175100001440000003002311733450607017127 0ustar tomusersPurpose The matrix widget allows a programmer to create and use a complex matrix. The matrix allows the user to enter in information in each cell and have all of the information returned. Construction Options A matrix widget is defined using the following syntax. The variable $matrixObject contains the reference to the matrix object. $matrixObject = new Cdk::Matrix ( options ); The options are defined in the following table. Option Default Value Type Purpose Rowtitles Required Array Ref The row titles. Coltitles Required Array Ref The column titles. Colwidths Required Array Ref The column widths. Coltypes Required Array Ref The display types of the columns. (see display help for more information) Vrows Required Scalar The number of rows seen on the screen. Vcols Required Scalar The number of columns seen on the screen. Rowspace 1 Scalar The amount of space between the rows. Colspace 1 Scalar The amount of space between the columns. Filler . Scalar The default cell fill character. Fillattr Normal Scalar The attribute of the default fill character. Dominant None Scalar The dominant row. This applies to when colors are applied to rows and columns. If there is a conflict, one takes precedence over the other. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Boxcell True Scalar This states that the individual cells are to be boxed. Boxmatrix False Scalar This states that the whole matrix is to be boxed. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a matrix widget. $listReference = $matrixObject->activate (); The variable $listReference contains a reference to a list of lists which contains the information within the matrix. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $matrixObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $matrixObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Values Required Array Ref This is a reference to an array of new values to be stored in the matrix. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $matrixObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $matrixObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $matrixObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $matrixObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $matrixObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $matrixObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $matrixObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $matrixObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $matrixObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $matrixObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $matrixObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $matrixObject->getwin(); Default Key Bindings Key Action Backspace Deletes the last character in the current cell. Delete Deletes the last character in the current cell. Right Arrow Moves the to the next cell on the right. Return Moves the to the next cell on the right. Left Arrow Moves the to the next cell on the left. Up Arrow Moves the to the next cell one row up. Down Arrow Moves the to the next cell one row down. Next Page Moves to the next screen of cells. CTRL-F Moves to the next screen of cells. Prev Page Moves to the previous screen of cells. CTRL-B Moves to the previous screen of cells. CTRL-G Jumps to a specific cell. CTRL-P Pastes the contents of the paste buffer in the current cell. CTRL-T Copies the contents of the current cell in the paste buffer. CTRL-E Erases the complete cell. CTRL-K Cuts the contents of the current cell and stores it in the paste buffer. CTRL-R Refreshes the screen. Tab Moves the to the next cell on the right. Escape Exits the Tips & Tricks You can have more than one column of row titles by setting certain columns to ViewOnly. This makes it appear like there are actually 2 matrices in one. Physical Restrictions Restriction Value Maximum Number of Rows 1000 Maximum Number of Columns 1000 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/help/histogram.help0000644000175100001440000001114606634015407017624 0ustar tomusersPurpose The histogram widget allows the programmer to create a histogram on the screen. The histogram can be aligned either horizontally or vertically. Construction Options A histogram widget is defined using the following syntax. The variable $histogramObject contains the reference to the histogram object. $histogramObject = new Cdk::histogram ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label which is attached to the histogram. Height Required Scalar The height of the histogram. Width Required Scalar The width of the histogram. Orient Required Scalar The orientation of the object. Lpos Left Scalar This is the position of the label in the histogram. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $histogramObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Low Required Scalar The low value of the histogram. High Required Scalar The high value of the histogram. Value Required Scalar The current value of the histogram. Filler Space Scalar The fill character of the histogram. Fillattr Reverse Scalar The attribute of the fill character. Statspos Top Scalar The position of the statistics. Sattrib Bold Scalar The attribute of the statistics. Box True Scalar Draws the window with a box around it. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $histogramObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $histogramObject->erase (); Tips & Tricks Try putting the statistics inside the histogram by setting the Statspos value to CENTER. raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $histogramObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $histogramObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $histogramObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $histogramObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $histogramObject->getwin(); Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 cdk-perl-20150928/fulldemo/help/itemlist.help0000644000175100001440000002670211733451054017463 0ustar tomusersPurpose The Cdk Itemlist widget allows the user to select a value from a list. This widget is very much like a 1 line scrolling list. Construction Options A itemlist widget is defined using the following syntax. The variable $itemlistObject contains the reference to the itemlist object. $itemlistObject = new Cdk::Itemlist ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label of the itemlist field. List Required Array Ref The list of items to choose from. Default 0 Scalar The default choice. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Lpos Left Scalar This is the position of the label in the window. Box True Scalar This boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a itemlist widget. $returnValue = $itemlistObject->activate (); The variable $returnValue contains a scalar value which represents the integer value of the corresponding item from the list. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $itemlistObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the itemlist field. $itemlistObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose List Required Arry Ref The list of items to choose from. Default 0 Scalar The default choice. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $itemlistObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $itemlistObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $itemlistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $itemlistObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $itemlistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $itemlistObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $itemlistObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $itemlistObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $itemlistObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $itemlistObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $itemlistObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $itemlistObject->getwin(); Default Key Bindings Key Action Up Arrow Displays the next item in the list. Right Arrow Displays the next item in the list. Space Displays the next item in the list. + Displays the next item in the list. n Displays the next item in the list. Down Arrow Displays the previous item in the list. Left Arrow Displays the previous item in the list. - Displays the previous item in the list. p Displays the previous item in the list. d Sets the list to the default choice. D Sets the list to the default choice. 0 Sets the list to the first choice in the list. $ Sets the list to the last choice in the list. Return Returns the current information in the field and exits the widget. Tab Returns the current information in the field and exits the widget. CTRL-N Returns the current information in the field and exits the widget. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget #!/usr/local/bin/perl # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a new itemlist object. @list = qw (January Feburary March April May June July August September November December); $month = new Cdk::Itemlist ( 'Label' => "Pick a month: ", 'List' => \@list); # Activate the object. $choice = $month->activate(); # Exit Cdk. Cdk::end(); # Print out the results. print "\n\n\n\n"; print "You selected: <$choice>\n"; <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 2012 cdk-perl-20150928/fulldemo/cdkdemo0000755000175100001440000010256312170627073015365 0ustar tomusers#!/usr/bin/perl -w # $Id: cdkdemo,v 1.9 2013/07/14 23:03:23 tom Exp $ # # Purpose: # This script demonstrates the Cdk widget set and how to use them. # use strict; # for dirname() use File::Basename; # # Use the Cdk module. # use Cdk; Cdk::init(); # Set up the label rows. my @titleMessage = ( "This is a CDK demo script", "It will demonstrate all of the", "widgets available with the", "Cdk Perl 5 extension." ); # Create the title. my $title = new Cdk::Label( 'Message' => \@titleMessage, 'Box' => "FALSE" ); # Set some global vars my $CONTINUE = "Press Any Key To Continue."; my $HOME = $ENV{'HOME'}; # Create the menu. my $currentLoc = 0; my @mLoc = ( "Switch to Pull-Up Menu ", "Switch to Pull-Down Menu" ); my @fMenu = ( "File", "Quit" ); my @iMenu = ( "Info", "Calendar ", "Date ", "Label ", "Scrolling Window", "Viewer " ); my @eMenu = ( "Entry", "Entry Field ", "Item List ", "Matrix ", "Multiple Line Entry Field", "Scale ", "Slider ", "Template " ); my @lMenu = ( "Lists", "Alpha List ", "Dialog ", "Radio List ", "Scrolling List", "Selection List" ); my @mMenu = ( "Misc", "Histogram ", "Graph ", "Marquee ", "Menu ", "$mLoc[$currentLoc]" ); my @hMenu = ( "Help", "General Help", "Widget Help ", "About... " ); # Create the pulldown menu menu lists. my @menulist = ( \@fMenu, \@iMenu, \@eMenu, \@lMenu, \@mMenu, \@hMenu ); # Set the location of the menus my @menuloc = ( "LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "RIGHT" ); # Create the menu my $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc ); # Create the callback for the menu. $menu->bind( 'Key' => '?', 'Function' => sub { main::menuCallback($menu); } ); # Create the scrolling window. my $swindow = new Cdk::Swindow( 'Title' => "Menu Selection History", 'Lines' => 200, 'Height' => 6, 'Width' => 60, 'Ypos' => "BOTTOM" ); my $menuItemCount = 0; # Let the user play. for ( ; ; ) { # Redraw the screen. Cdk::refreshCdkScreen(); # Get the selection. my ( $submenu, $submenuItem ) = $menu->activate(); my $menuSelection = $menulist[$submenu]->[$submenuItem]; # I'm going to use the name, instead of the numeric value to # determine what was picked. But either way is acceptable. if ( $menuSelection =~ "Label" ) { my @mesg = ( "You just selected the Cdk label widget", "demo. The labels have many personalities", "To discover them all, use the help option", "and pick the Label item.", "", "$CONTINUE" ); labelDemo(@mesg); } elsif ( $menuSelection =~ "Calendar" ) { itemlistDemo(); } elsif ( $menuSelection =~ "Date" ) { my $date = qx (date); chomp $date; my @mesg = ( "The current time is:", "", "$date", "", "$CONTINUE" ); labelDemo(@mesg); } elsif ( $menuSelection =~ "Scrolling Window" ) { # Put a message inside the scrolling window. $swindow->addline( 'Info' => "This is the scrolling window. It's purpose" ); $swindow->addline( 'Info' => "is to act as an information window. It also" ); $swindow->addline( 'Info' => "has the ability to display colors" ); $swindow->addline( 'Info' => "and attributes." ); $swindow->addline( 'Info' => "Hit return, tab, or escape to exit this window." ); $swindow->activate(); } elsif ( $menuSelection =~ "Viewer" ) { viewerDemo(); } elsif ( $menuSelection =~ "Multiple Line Entry Field" ) { mentryDemo(); } elsif ( $menuSelection =~ "Entry Field" ) { entryDemo(); } elsif ( $menuSelection =~ "Item List" ) { itemlistDemo(); } elsif ( $menuSelection =~ "Template" ) { templateDemo(); } elsif ( $menuSelection =~ "Matrix" ) { matrixDemo(); } elsif ( $menuSelection =~ "$mLoc[$currentLoc]" ) { # We are going to switch the menu type. if ( $currentLoc == 0 ) { # Pull-Down to Pull-Up $currentLoc = 1; @mMenu = ( "Misc", "Histogram ", "Graph ", "Marquee ", "Menu ", "$mLoc[$currentLoc]" ); @menulist = ( \@fMenu, \@iMenu, \@eMenu, \@lMenu, \@mMenu, \@hMenu ); undef $menu; my $highlight = ""; $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc, 'Tattrib' => $highlight, 'Menupos' => "BOTTOM", 'SubTattrib' => $highlight ); } elsif ( $currentLoc == 1 ) { # Pull-Up to Pull-Down $currentLoc = 0; @mMenu = ( "Misc", "Histogram ", "Graph ", "Marquee ", "Menu ", "$mLoc[$currentLoc]" ); @menulist = ( \@fMenu, \@iMenu, \@eMenu, \@lMenu, \@mMenu, \@hMenu ); undef $menu; my $highlight = ""; $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc, 'Tattrib' => $highlight, 'Menupos' => "TOP", 'SubTattrib' => $highlight ); } } elsif ( $menuSelection =~ "Menu" ) { # Pop up a message stating what we got. my @mesg = ( "The Cdk Menu widget is what", "is driving this application.", "", "$CONTINUE" ); labelDemo(@mesg); } elsif ( $menuSelection =~ "Dialog" ) { dialogDemo(); } elsif ( $menuSelection =~ "Scrolling List" ) { scrollDemo(); } elsif ( $menuSelection =~ "Selection List" ) { selectionDemo(); } elsif ( $menuSelection =~ "Radio List" ) { radioDemo(); } elsif ( $menuSelection =~ "Histogram" ) { histogramDemo(); } elsif ( $menuSelection =~ "Graph" ) { graphDemo(); } elsif ( $menuSelection =~ "Scale" ) { scaleDemo(); } elsif ( $menuSelection =~ "Slider" ) { sliderDemo(); } elsif ( $menuSelection =~ "Marquee" ) { marqueeDemo(); } elsif ( $menuSelection =~ "Alpha List" ) { alphalistDemo(); } elsif ( $menuSelection =~ "General Help" ) { generalHelp(); } elsif ( $menuSelection =~ "Widget Help" ) { widgetHelp(); } elsif ( $menuSelection =~ "About..." ) { # Pop up a message about this script. my @mesg = ( "Cdk Perl 5 Extension", "Written by Mike Glover", "and Thomas E. Dickey", "", "Created : December, 1995", "Last Updated: July, 2013", "", $CONTINUE ); my $label = new Cdk::Label( 'Message' => \@mesg, 'Shadow' => "TRUE" ); $label->draw(); $label->wait(); } elsif ( $menuSelection =~ "Quit" ) { # Add a message to the scrolling window. $swindow->addline( 'Info' => "Goodbye..." ); sleep 2; # Exit. Cdk::end(); exit(1); } # Add the chosen item to the scrolling window. my $item = $menulist[$submenu]->[0] . "->" . $menuSelection; $swindow->addline( 'Info' => "$menuItemCount : $item" ); $menuItemCount++; } ############################################################################## # # This demonstrates the Cdk label widget. # sub labelDemo { my @mesg = @_; # Create the label. my $label = new Cdk::Label( 'Message' => \@mesg ); # Draw the label and wait. $label->draw(); $label->wait(); } ############################################################################## # # This demostrates the Cdk viewer widget. # sub viewerDemo { # Use the file selector widget to get a filename. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Height' => 20, 'Width' => 50, 'Dattrib' => "", 'Lattrib' => "", 'Fattrib' => "" ); my $fname = $fselect->activate(); $fselect->erase(); # Check if the person hit escape. if ( !defined $fname ) { return; } # Popup a file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => 0, 'Width' => -2 ); # Load in the file. my @info = qx (cat $fname); chomp(@info); # Set the contents of the viewer. $viewer->set( 'Info' => \@info, 'Interpret' => "TRUE", 'Title' => "Viewing filename:$fname" ); # Activate the viewer. $viewer->activate(); } ############################################################################## # # This demonstrates the Cdk entry widget. # sub entryDemo { my $continue; my $entry = new Cdk::Entry( 'Label' => "Enter a new pause prompt: ", 'Max' => 125, 'Width' => 30 ); $continue = $entry->activate(); $entry->erase(); # Check if they hit escape. if ( !defined $continue ) { popupLabel( [ "Escape Hit", "Pause prompt not changed.", "", "$CONTINUE" ] ); return; } # Pop up a message stating what we got. $CONTINUE = $continue; my @mesg = ( "The new pause prompt is now set to", "what is below this message", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk itemlist widget. # sub itemlistDemo { # Declare locals. my $row; # Create the list. my @months = ( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ); # Get the current date info. my $info = qx (date +"%d,%m,%Y"); chomp $info; my ( $currentDay, $currentMonth, $currentYear ) = split( /,/, $info ); $currentMonth--; # Create n itemlist to get the month. my $monthList = new Cdk::Itemlist( 'Label' => 'Pick a month ', 'Default' => $currentMonth, 'List' => \@months ); # Get the month name. my $month = $monthList->activate(); undef $monthList; # Did they hit escape? return if !defined $month; $month++; # Create a scale to get the year. my $yearScale = new Cdk::Scale( 'Label' => 'Pick a year', 'Width' => 6, 'Low' => "1900", 'High' => "2200" ); # Set the limits of the years to select from. $yearScale->set( 'Low' => 1900, 'High' => '2200', 'Value' => "$currentYear" ); # Get the year. my $year = $yearScale->activate(); undef $yearScale; # Did they hit escape? return if !defined $year; # Get the day my $dayScale = new Cdk::Scale( 'Label' => 'Pick a day', 'Width' => 5, 'Low' => 1, 'High' => 31 ); # Set the limits of the days to select from. $dayScale->set( 'Low' => 1, 'High' => '31', 'Value' => "$currentDay" ); # Get the day. my $day = $dayScale->activate(); undef $dayScale; # Did they hit escape? return if !defined $day; # Create the calander. my $cal = new Cdk::Calendar( 'Day' => $day, 'Month' => $month, 'Year' => $year, 'Dattrib' => "", 'Mattrib' => "", 'Yattrib' => "" ); $cal->activate(); } ############################################################################## # # This demonstrates the Cdk Template widget. # sub templateDemo { # Create the template widget. my $birthday = new Cdk::Template( 'Label' => 'Enter your birthday: ', 'Plate' => '##/##/####', 'Overlay' => 'DD-MM-YYYY' ); # Get the birthday. my $bday = $birthday->activate(); # Did the user hit escape? return if !defined $bday; # Get the mixed value from the template. my $bday2 = $birthday->mix(); # Display the results. my @mesg = ( "Birthday without plate mixing: $bday", "Birthday with plate mixing: $bday2", "", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk multiple line entry widget. # sub mentryDemo { # Create the mentry widget. my $mentry = new Cdk::Mentry( 'Label' => "Enter Anything:", 'Width' => 20, 'Lrows' => 10, 'Prows' => 5 ); # Activate the mentry widget. my $info = $mentry->activate(); # Did the user hit escape? return if !defined $info; # Display the results. my @mesg = ( "You just typed:", "$info", "", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk matrix widget. # sub matrixDemo { my @colTitles = ( "Item Name", "Base Price", "% Markup" ); my @rowTitles = ( "Item 1", "Item 2", "Item 3" ); my @colWidths = ( 30, 10, 10 ); my @colTypes = ( "VIEWONLY", "VIEWONLY", "INT" ); my @matrixValues = ( [ "Flabberit", "10.99", "" ], [ "Whatzit", "102.99", "" ], [ "Albatross", "99.99", "" ] ); my ( @newlist, $x ); # Create the matrix widget. my $matrix = new Cdk::Matrix( 'Title' => [ "Flabberjabbit Sales", "" ], 'RowTitles' => \@rowTitles, 'ColTitles' => \@colTitles, 'ColWidths' => \@colWidths, 'ColTypes' => \@colTypes, 'Vrows' => 3, 'Vcols' => 3 ); # Set the values of the matrix. $matrix->set( 'Values' => \@matrixValues ); # Activate the matrix. my ( $rows, $cols, $info ) = $matrix->activate(); # Did the user hit escape? return if !defined $rows; # Take the information from the matrix and redisplay it. push( @newlist, "Name Base Percent Price" ); for ( $x = 0 ; $x < $rows ; $x++ ) { if ( $info->[$x][2] ne "" ) { my $name = $info->[$x][0]; my $base = $info->[$x][1]; my $perc = $info->[$x][2]; my $price = $base + ( $base * $perc ) / 100; push( @newlist, sprintf( "%-10s %4.2f %4.2f %4.2f", $name, $base, $perc, $price ) ); } } # Create the file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => 8, 'Width' => 60 ); # Set the contents of the viewer. $viewer->set( 'Title' => "Adjusted Price List", 'Info' => \@newlist ); # Activate the viewer. $viewer->activate(); } ############################################################################## # # This demonstrates the Cdk Dialog widget. # sub dialogDemo { my @mesg = ( "Cheesy Unix Command Interface", "Select a command from the buttons." ); # Create the buutons for the dialog box. my @buttons = ( "date", "pwd", "whoami", "ls -l" ); # Create the dialog widget. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons ); # Activate the dialog box. my $pick = $dialog->activate(); $dialog->erase(); # Did the user hit escape? return if !defined $pick; # Check what we want to run. if ( $buttons[$pick] =~ "ls -l" ) { # Get the directory listing. my @info = qx (ls -l ${HOME}); chomp(@info); # Create the file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => 15, 'Width' => 60 ); # Set the contents of the viewer. $viewer->set( 'Title' => "Listing $HOME", 'Info' => \@info ); $viewer->activate(); } else { # We want to run anything but ls -l my $result = qx ($buttons[$pick]); chomp $result; # Display the result. my @mesg = ( "The command $buttons[$pick] produced the following:", "$result", "$CONTINUE" ); labelDemo(@mesg); } } ############################################################################## # # This demonstrates the Cdk Scrolling widget. # sub scrollDemo { my ( $x, @items ); # Create an itemlist widget to determine if the user wants numbers or not. my $boolean = new Cdk::Itemlist( 'Label' => 'Do You Want Numbers?:', 'Default' => 0, 'List' => [ "No", "Yes" ] ); # Create a scale widget for the number of elements. my $size = new Cdk::Scale( 'Label' => 'How Many Items?', 'Width' => 5, 'Low' => 10, 'High' => 100 ); # Create an entry field for the title of the scrolling list. my $entry = new Cdk::Entry( 'Label' => 'Title: ', 'Max' => 100, 'Min' => 2, 'Width' => 20 ); # Get whether they want numbers or not. my $nums = $boolean->activate(); return if !defined $nums; # Get the number of elements. my $count = $size->activate(); # Get the title of the scrolling list. my $title = $entry->activate(); # Create the item list for ( $x = 1 ; $x <= $count ; $x++ ) { push( @items, "This is item #$x" ); } # Create the scrolling list. my $scrollDemo = new Cdk::Scroll( 'Title' => "$title", 'Highlight' => "", 'List' => \@items, 'Numbers' => $nums, 'Height' => 14, 'Width' => 20 ); # Activate the scrolling list. my $selection = $scrollDemo->activate(); return if !defined $selection; # Spit out the results. my @mesg = ( "You selected", "$items[$selection]", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Selection widget. # sub selectionDemo { my ( $x, @result ); # Create the list of commands to choose from. my @commands = ( "date", "whoami", "pwd", "hostname", "uname -a" ); # Create the selection scrolling list. my $select = new Cdk::Selection( 'Title' => "Select Commands", 'List' => \@commands, 'Choices' => [ "Yep", "Nope" ], 'Height' => 8, 'Width' => 20 ); # Activate the selection widget. my @info = $select->activate(); # Did the user hit escape? return if !@info; # Create the result message. @result = ( "Here are the results from the commands you selected:", "" ); for ( $x = 0 ; $x <= $#info ; $x++ ) { if ( $info[$x] eq 0 ) { my $tmp = qx ($commands[$x]); chomp $tmp; my $fmt = sprintf( "%10s...%-30s", $commands[$x], $tmp ); push( @result, $fmt ); } } push( @result, "" ); push( @result, "$CONTINUE" ); # Spit the results out. labelDemo(@result); } ############################################################################## # # This demonstrates the Cdk Radio widget. # sub radioDemo { # Create the radio list my @colors = ( "White", "Red", "Green", "Yellow", "Blue", "Purple", "Cyan" ); # Create the radio widget. my $radio = new Cdk::Radio( 'Title' => "Pick A Color", 'List' => \@colors, 'Highlight' => "A_REVERSE", 'Height' => 7, 'Width' => 10 ); # Activate the radio list. my $color = $radio->activate(); # Did the user hit escape? return if !defined $color; # Display the results. my @mesg = ( "You Selected", " $colors[$color]", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Histogram widget. # sub histogramDemo { my ($x); # Create the histogram label. my $histLabel = "Time In Seconds This Demo Has Run"; # Create the histogram widget. my $hist = new Cdk::Histogram( 'Title' => $histLabel, 'Orient' => "HORIZONTAL", 'Height' => 5, 'Width' => 0 ); # Take the current time - the start time of this script. my $diff = time - $; # Redraw the histogram every second. for ( $x = 0 ; $x < 5 ; $x++ ) { # Set the values of the histogram. $hist->set( 'Low' => 1, 'FillerChar' => " ", 'High' => $diff + 25, 'Value' => $diff + $x, 'Statstype' => "REAL", 'Statspos' => "CENTER" ); # Redraw the histogram. $hist->draw(); # Sleep for a sec. sleep(1); } } ############################################################################## # # This demonstrates the Cdk Marquee widget. # sub marqueeDemo { # Create an entry widget to get the user's message. my $entry = new Cdk::Entry( 'Label' => 'Enter a Message: ', 'Max' => 100, 'Min' => 2, 'Width' => 20 ); # Activate the widget to get the message. my $message = $entry->activate(); $entry->erase(); return if !defined $message; # Create the widget to get the number times to repeat the message. my $rvalue = new Cdk::Scale( 'Label' => 'Repeat Value:', 'Width' => 5, 'Low' => 1, 'High' => 20 ); # Get the repeat value from the user. my $repeat = $rvalue->activate(); $rvalue->erase(); # Create the widget to get the delay. my $dvalue = new Cdk::Scale( 'Label' => 'Delay Value:', 'Width' => 5, 'Low' => 1, 'High' => 20 ); # Get the delay value. my $delay = $dvalue->activate() * 10; $dvalue->erase(); # Create the widget to get the width of the marquee widget. my $mWidth = new Cdk::Scale( 'Label' => 'Marquee Width:', 'Width' => 5, 'Low' => length($message), 'High' => 50 ); # Get the width of the marquee widget. my $width = $mWidth->activate(); $mWidth->erase(); # Create the marquee widget. my $marquee = new Cdk::Marquee( 'Width' => $width ); # Activate the marquee widget. $marquee->activate( 'Message' => $message, 'Delay' => $delay, 'Repeat' => $repeat ); } ############################################################################## # # This demonstrates the Cdk Graph widget. # sub graphDemo { # Create the graph. my $graph = new Cdk::Graph( 'Title' => "Camel Count", 'Xtitle' => "Quantity", 'Ytitle' => "Months", 'Height' => -4, 'Width' => -20 ); # Set the graph values. my @numberList = qw (10 12 14 16 17 22 31); my $graphChars = "ooooooo"; $graph->set( 'Values' => \@numberList, 'DisplayType' => "PLOT", 'GraphChars' => $graphChars ); # Draw the graph. $graph->draw(); # Prompt the user. my @mesg = ( "When done looking at your Camels", "$CONTINUE" ); my $label = new Cdk::Label( 'Message' => \@mesg, 'Xpos' => "BOTTOM" ); $label->draw(); $label->wait(); } ############################################################################## # # This demonstrates the Cdk Scale widget. # sub scaleDemo { # Create the scale widget. my $scale = new Cdk::Scale( 'Label' => 'Pick a number:', 'Width' => 5, 'Low' => 10, 'High' => 100 ); # Activate the widget. my $num = $scale->activate(); # Display the results. my @mesg = ( "You chose $num.", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Slider widget. # sub sliderDemo { # Create the scale widget. my $slider = new Cdk::Slider( 'Label' => 'Pick a number:', 'Filler' => " ", 'Width' => 50, 'Low' => 10, 'High' => 100 ); # Activate the widget. my $num = $slider->activate(); undef $slider; # Display the results. my @mesg = ( "You chose $num.", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Alpha List widget. # sub alphalistDemo { my @acctList = (); my $tmp; # Reset the password entry pointer. setpwent(); # Get a list of all the accounts on this box. while ( $tmp = getpwent ) { push( @acctList, $tmp ); } # Create the scale widget. my $alpha = new Cdk::Alphalist( 'Label' => 'Select an account:', 'List' => \@acctList, 'Width' => 50, 'Height' => 10 ); # Activate the widget. my $acct = $alpha->activate(); $alpha->erase(); # Display the results. my @mesg = ( "You chose $acct.", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This is the help menu option under help. # sub generalHelp { my $choice = 0; my $helpdir = $ENV{'CDKHELPDIR'} || dirname($0) . "/help"; # Define the names of the help files. my @helpFiles = ( "general.help", "concepts.help", "binding.help", "preprocess.help", "postprocess.help", "display.help", "special.help", "charfile.help", "colors.help", "debug.help", "future.help", "bugs.help" ); # Define the concepts. my @conceptList = ( "General Information About Cdk", "Cdk Concepts ", "Creating a key binding. ", "Creating a pre-process. ", "Creating a post-process. ", "Cdk Display Types ", "Special Display Attributes ", "Special Character Formats ", "Predefined Colors ", "Debugging Cdk Code ", "The Future of Cdk ", "Known Bugs ", "Exit Help " ); # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Create the scrolling list ... my $helplist = new Cdk::Scroll( 'Title' => "Pick A Topic", 'Highlight' => "", 'List' => \@conceptList, 'Numbers' => "TRUE", 'Height' => $#conceptList + 4, 'Width' => 40 ); # Keep doing this until we are told to leave. for ( ; ; ) { # Redraw the screen. Cdk::refreshCdkScreen(); # Get the choice from the user. my $choice = $helplist->activate(); # Exit if we have to . return if !defined $choice; return if $choice == $#conceptList; # Create the help filename my $helpfile = "${helpdir}/$helpFiles[$choice]"; my $topic = "$conceptList[$choice]"; # Check if the file exists. if ( !-e $helpfile ) { my @error = ( "Can not seem to find the help file on the topic $topic", "Try setting the CDKHELPDIR environment variable", "or check if the help file '$helpfile' exists", "", "$CONTINUE" ); labelDemo(@error); } else { # Display the file. my @info = (); my $helpviewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => $rows - 3, 'Width' => $cols - 2 ); chop( @info = `cat $helpfile` ); my $topic = "Help from $helpfile"; $helpviewer->set( 'Title' => "Help: $topic", 'Info' => \@info ); $helpviewer->activate(); } } } sub widgetHelp { my ( $helpfile, $topic, $helpviewer ); my $helpdir = $ENV{'CDKHELPDIR'} || "./help"; # Define the widget help files. my @helpFiles = ( "alphalist.help", "calendar.help", "dialog.help", "entry.help", "fselect.help", "graph.help", "histogram.help", "itemlist.help", "label.help", "marquee.help", "matrix.help", "menu.help", "mentry.help", "radio.help", "scale.help", "scroll.help", "swindow.help", "selection.help", "slider.help", "template.help", "viewer.help" ); # Define the widget help entries. my @widgetList = ( "Alphalist Widget ", "Calendar Widget ", "Dialog Widget ", "Entry Field Widget ", "File Selector Widget ", "Graph Widget ", "Histogram Widget ", "Item List Widget ", "Label Widget ", "Marquee Widget ", "Matrix Widget ", "Menu Widget ", "Multiple Line Entry Widget ", "Radio List Widget ", "Scale Widget ", "Scrolling List Widget ", "Scrolling Window Widget ", "Selection List Widget ", "Slider Widget ", "Template Widget ", "Viewer Widget ", "Exit Help " ); # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Create the scrolling list ... my $helplist = new Cdk::Scroll( 'Title' => "Pick A Topic", 'Highlight' => "", 'List' => \@widgetList, 'Numbers' => "TRUE", 'Height' => $#widgetList + 4, 'Width' => 40 ); # Keep doing this until we are told to leave. for ( ; ; ) { # Redraw the screen. Cdk::refreshCdkScreen(); my $choice = $helplist->activate(); # Exit if we have to . return if !defined $choice; return if ( $choice == $#widgetList ); # Create the help filename $helpfile = "${helpdir}/$helpFiles[$choice]"; $topic = "$widgetList[$choice]"; # Does the help file exist? if ( !-e $helpfile ) { my @error = ( "Can not seem to find the help file on the topic $topic", "Try setting the CDKHELPDIR environment variable", "or check if the help file '$helpfile' exists", "", "$CONTINUE" ); labelDemo(@error); } else { # Display the file. my @info = (); my $helpviewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => $rows - 3, 'Width' => $cols - 2 ); chop( @info = `cat $helpfile` ); $helpviewer->set( 'Title' => "Help: $topic", 'Info' => \@info ); $helpviewer->activate(); } } } # # This is the callback function for the menu. # sub menuCallback { my $menu = shift; # Call the help function. main::help(); # Refresh the screen. Cdk::refreshCdkScreen(); return 1; } cdk-perl-20150928/fixpaths0000755000175100001440000000124207517630620013767 0ustar tomusers#!/bin/sh # $Id: fixpaths,v 1.1 2002/07/24 23:00:32 tom Exp $ # # Run this script to update the paths in scripts under the current directory # which have perl's pathname, so they can be run in your configuration. # PERL=`which perl` TEXT="#!$PERL -w" for name in `find . -type f -print` do case $name in *~) ;; *) head=`head -1 $name` case $head in #(vi \#!*perl*) #(vi echo process $name if test "$TEXT" != "$head" ; then echo "...updating " rm -f ${name}~ mv ${name} ${name}~ sed -e "s@$head@$TEXT@" ${name}~ >${name} chmod +x ${name} else echo "...unchanged" fi ;; *) # echo ignored $name ;; esac ;; esac done cdk-perl-20150928/config.sub0000755000175100001440000010636712521135144014204 0ustar tomusers#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-03-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cdk-perl-20150928/config.guess0000755000175100001440000012463712521135173014543 0ustar tomusers#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-03-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cdk-perl-20150928/MANIFEST0000644000175100001440000001600412171572525013347 0ustar tomusersMANIFEST this file CHANGES changelog for Perl/Cdk COPYING copyright notice Cdk.pm perl module for Cdk Cdk.xs perl interface to Cdk Makefile.PL.in perl makefile template README overview (read this first) aclocal.m4 macros for autoconf config.guess utility script config.sub utility script configure configure script configure.in configure-script template fixpaths script to fix pathnames of perl in perl-scripts install-sh utility script typemap mapping between Perl and C parameter types Cdk/Alphalist.pm Cdk::Alphalist package Cdk/Buttonbox.pm Cdk::Buttonbox package Cdk/Calendar.pm Cdk::Calendar package Cdk/Debug.pm Cdk::Debug package Cdk/Diag.pm Cdk::Diag package Cdk/Dialog.pm Cdk::Dialog package Cdk/Entry.pm Cdk::Entry package Cdk/Fselect.pm Cdk::Fselect package Cdk/Graph.pm Cdk::Graph package Cdk/Histogram.pm Cdk::Histogram package Cdk/Itemlist.pm Cdk::Itemlist package Cdk/Label.pm Cdk::Label package Cdk/Marquee.pm Cdk::Marquee package Cdk/Matrix.pm Cdk::Matrix package Cdk/Mentry.pm Cdk::Mentry package Cdk/Menu.pm Cdk::Menu package Cdk/Radio.pm Cdk::Radio package Cdk/Scale.pm Cdk::Scale package Cdk/Scroll.pm Cdk::Scroll package Cdk/Selection.pm Cdk::Selection package Cdk/Slider.pm Cdk::Slider package Cdk/Swindow.pm Cdk::Swindow package Cdk/Template.pm Cdk::Template package Cdk/Viewer.pm Cdk::Viewer package demos/async Demonstrates how to manipulate defined widgets asynchronously. demos/bday Demonstrates how to use the calendar widget. demos/perlbug Rips off Larry's utils/perlbug program. demos/pkgInfo Basic Solaris package install/remove program. demos/pwdInfo Basic password file browser. demos/rolodex Comprehensive personal rolodex. demos/workman A workman database editor examples/alphalist Demonstrates the alphalist widget. examples/bind Demonstrates how to use the bind function. examples/buttonbox Demonstrates the buttonbox widget. examples/calendar Demonstrates the calendar widget. examples/dialog Demonstrates the dialog widget. examples/entry Demonstrates the entry widget. examples/fselect Demonstrates the file selector widget. examples/graph Demonstrates the graph widget. examples/histogram Demonstrates the histogram widget. examples/itemlist Demonstrates the itemlist widget. examples/label Demonstrates the label widget. examples/marquee Demonstrates the marquee widget. examples/matrix Demonstrates the matrix widget. examples/mentry Demonstrates the mentry widget. examples/menu Demonstrates the menu widget. examples/postProcess Demonstrates how to use the post-process capabilities. examples/preProcess Demonstrates how to use the pre-process capabilities. examples/radio Demonstrates the radio-button widget. examples/scale Demonstrates the scale widget. examples/scroll Demonstrates the scroll widget. examples/selection Demonstrates the selection widget. examples/slider Demonstrates the slider widget. examples/swindow Demonstrates the scrolling window widget. examples/template Demonstrates the template widget. examples/viewer Demonstrates the viewer widget. fulldemo/cdkdemo combines all of the widgets via pulldown-menus fulldemo/help/alphalist.help description of alphalist-widget fulldemo/help/binding.help description of binding-widget fulldemo/help/bugs.help known bugs in Perl+Cdk fulldemo/help/calendar.help description of calendar-widget fulldemo/help/charfile.help using line-drawing graphics in Perl+Cdk fulldemo/help/colors.help how to use color in Perl+Cdk fulldemo/help/concepts.help concepts & terminology used in Perl+Cdk fulldemo/help/debug.help comments on debugging Perl+Cdk fulldemo/help/dialog.help description of dialog-widget fulldemo/help/display.help notes on display-options fulldemo/help/entry.help description of entry-widget fulldemo/help/fselect.help description of fselect-widget fulldemo/help/future.help wishlist/future development fulldemo/help/general.help general comments on Perl+Cdk fulldemo/help/graph.help description of graph-widget fulldemo/help/histogram.help description of histogram-widget fulldemo/help/itemlist.help description of itemlist-widget fulldemo/help/label.help description of label-widget fulldemo/help/marquee.help description of marquee-widget fulldemo/help/matrix.help description of matrix-widget fulldemo/help/mentry.help description of mentry-widget fulldemo/help/menu.help description of menu-widget fulldemo/help/postprocess.help description of postprocess-widget fulldemo/help/preprocess.help description of preprocess-widget fulldemo/help/radio.help description of radio-widget fulldemo/help/scale.help description of scale-widget fulldemo/help/scroll.help description of scroll-widget fulldemo/help/selection.help description of selection-widget fulldemo/help/slider.help description of slider-widget fulldemo/help/special.help special keywords used in Cdk's viewer fulldemo/help/swindow.help description of swindow-widget fulldemo/help/template.help description of template-widget fulldemo/help/viewer.help description of viewer-widget package/cdk-perl.spec spec file originally from PLD package/debian/README.source Debian build script package/debian/changelog Debian build script package/debian/compat Debian build script package/debian/compress build-script package/debian/control Debian build script package/debian/copyright Debian build script package/debian/libcdk-perl.examples Debian build script package/debian/rules Debian build script package/debian/source/format Debian build script package/debian/watch Debian build script package/freebsd/Makefile FreeBSD port package/freebsd/distinfo FreeBSD port package/freebsd/pkg-descr FreeBSD port package/freebsd/pkg-plist FreeBSD port cdk-perl-20150928/Cdk.pm0000644000175100001440000001112712602361651013251 0ustar tomusers# $Id: Cdk.pm,v 1.14 2015/09/29 01:04:41 tom Exp $ package Cdk; use Exporter (); use DynaLoader (); use AutoLoader (); @ISA = qw(Exporter DynaLoader); # Force input buffering off. select (STDIN); $| = 1 ; # Set the version. $VERSION = "5.20150928"; # must be a floating-point number # Set the diag flag off. $DIAGFLAG = 0; # Items to export into callers' namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw (VERSION checkDef checkReq popupLabel popupDialog); sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() # XS function. If a constant is not found then control is passed # to the AUTOLOAD in AutoLoader. my $constname; ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { if ($! =~ /Invalid/) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } else { die "Your vendor has not defined Cdk macro $constname"; } } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; } bootstrap Cdk; # # This draws a string on the given/or not window. # sub drawMesg { my $type = shift; my %params = @_; my $name = "${type}::new"; my ($mesg, $xpos, $ypos, $attrib, $window); # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. $mesg = Cdk::checkReq ($name, "Message", $params{'Message'}); $xpos = Cdk::checkDef ($name, "Xpos", $params{'Xpos'}, Cdk::CENTER()); $ypos = Cdk::checkDef ($name, "Ypos", $params{'Ypos'}, Cdk::CENTER()); $attrib = Cdk::checkDef ($name, "Attrib", $params{'Attrib'}, Cdk::A_NORMAL()); $align = Cdk::checkDef ($name, "Align", $params{'Align'}, Cdk::HORIZONTAL()); # If they passed an object, dereference its window and draw on it. if ($params{'Object'}) { $window = $params{'Object'}->getWindow(); } else { $window = Cdk::getCdkWindow(); } # Start drawing. Cdk::DrawMesg ($window, $mesg, $xpos, $ypos, $attrib, $align); } # # This checks if a value has been given a value, if not, then it gives it one. # sub checkDef { my ($type, $name, $value, $def) = @_; # Check if it is defined. if (!defined $value) { Cdk::Diag::Log ("Diag", $type, "Default parameter $name being set to default value <$def>"); return ($def); } else { Cdk::Diag::Log ("Diag", $type, "Default parameter $name being set to value <$def>"); return ($value); } } # # This checks if a value has been given a value. If not it reports an error. # sub checkReq { my ($type, $name, $value) = @_; # Check if it is defined. if (! defined $value) { # Close the Cdk screen and shut down curses. Cdk::end(); # Report the error. Cdk::Diag::Log ("Error", $type, "Required parameter $name has no value."); # Get out. exit (1); } else { # Report the info. Cdk::Diag::Log ("Diag", $type, "Required parameter $name being set to <$value>"); return ($value); } } # # This pops up a label. # sub popupLabel { my $mesg = shift; my $popup = new Cdk::Label ("Message" => $mesg); $popup->draw(); $popup->wait(); } # # This pops up a question on the screen. # sub popupDialog { my ($mesg, $buttons) = @_; my $popup = new Cdk::Dialog ('Message' => $mesg, 'Buttons' => $buttons); return $popup->activate(); } # # This function takes a scalar and returns a list with elements in the # list to the given width. # sub scalar2List { my ($scalar, $elementLen) = @_; my $tempLine = ""; my $lineLen = 0; my @info = (); my $x = 0; # Break the scalar into a list. $_ = $scalar; my @wordList = split; # Put each scalar back into an array of $elementLen length or more. for ($x=0; $x <= $#wordList; $x++) { $lineLen += length ($wordList[$x]); $tempLine .= "$wordList[$x] "; if ($lineLen >= $elementLen) { push (@info, $tempLine); $tempLine = ""; $lineLen = 0; } } push (@info, $tempLine); return @info; } # # Load the object modules. # use Cdk::Alphalist; use Cdk::Buttonbox; use Cdk::Calendar; use Cdk::Diag; use Cdk::Dialog; use Cdk::Entry; use Cdk::Fselect; use Cdk::Graph; use Cdk::Histogram; use Cdk::Itemlist; use Cdk::Label; use Cdk::Marquee; use Cdk::Matrix; use Cdk::Mentry; use Cdk::Menu; use Cdk::Radio; use Cdk::Scale; use Cdk::Scroll; use Cdk::Selection; use Cdk::Slider; use Cdk::Swindow; use Cdk::Template; use Cdk::Viewer; 1; __END__