Skip to Content.
Sympa Menu

freetds - RE: [freetds] First draft of API documentation completed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] First draft of API documentation completed
  • Date: 26 Mar 2003 08:52:20 -0800

On Wed, 2003-03-26 at 07:55, Lowden, James K wrote:
> > From: ZIGLIO Frediano [mailto:Frediano.Ziglio AT vodafoneomnitel.it]
> > Sent: March 26, 2003 6:12 AM
> >
> > > 3. Use Perl to reformat the resulting Doxygen warnings into doxygen
> > > comments. Most of the warnings had to do with missing
> > > parameters. It was a
> > > simple thing to convert them into "\param" lines.
> >
> > You know... I'm not a Perl guru, you seem to be the Perl guru
> > of group...
>
> I'm JAPH. I find C++, SQL, and Perl sufficient for everything I do. One of
> these days, I'm going to write isql in Perl, as a demonstration. Without
> looking, I bet it's already been done.

A few times :-)

Here's one I wrote for perl 4.x/sybperl 1.x (timestamp on the file is
1994...)

#!/usr/local/bin/sybperl

require 'sybperl.pl';
require 'getopts.pl';

&Getopts('P:U:');

&dblogin($opt_U, $opt_P);

select(STDOUT); $| = 1; # set unbuffered

$count = 1;
print "$count> ";

while(<>)
{
/^exit|^quit/ && exit(0);
/^go/ && do {
&exec;
$count = 1;
print "$count> ";
next;
};

&dbcmd($_);
++$count;
print "$count> ";
}

sub exec
{
local($ret, $numcol, $i);
local(@dat, %width);

&dbsqlexec;
while(($ret = &dbresults) != $NO_MORE_RESULTS)
{
$numcol = &dbnumcols;
for($i = 1; $i <= $numcol; ++$i)
{
$width{$i} = &dbcollen(0, $i);
printf("%-$width{$i}.$width{$i}s ", &dbcolname(0, $i));
}
print "\n\n";
while(@dat = &dbnextrow)
{
for($i = 1; $i <= $numcol; ++$i)
{
printf("%$width{$i}.$width{$i}s ", $dat[$i-1]);
}
print "\n";
}
while(@dat = &dbretdata)
{
print "@dat\n";
}
}
}

I never actually used it, but I wrote this as an example for use in the
presentation I did at the Sybase User Conference in San Jose in 1994...

Michael :-)
--
Michael Peppler Data Migrations, Inc.
mpeppler AT peppler.org http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.mbay.net/~mpeppler/resume.html




Archive powered by MHonArc 2.6.24.

Top of Page