Skip to Content.
Sympa Menu

freetds - Re: FreeTDS under VMS (changes suggestion)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James Cameron <cameron AT stl.dec.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: FreeTDS under VMS (changes suggestion)
  • Date: Tue, 21 Nov 2000 09:22:36 +1100


"Ruslan R. Laishev" wrote:
> VMS Diff is not enough?

Correct. You probably don't understand the "patch" program, which can
take a UNIX diff and edit the source file automatically. Those who
maintain open source software are able to adopt changes without starting
up an editor. I would expect any department of serious OpenVMS
programmers to have adopted critical tools like this from their UNIX
brethren by now.

> I have tried to fix a legacy programming practice: using of a ASCIZ
> instead of ASCIC and something like it represetntation of the ASCII
> string.

You are using terms that the rest of this mailing list will probably not
comprehend, so I shall explain them. They are OpenVMS specific terms.
ASCIZ is a string terminated by a NUL, the usual method used by C
programmers. It isn't legacy as such, it is defined in the ANSI
standard for the C language. ASCIC is a counted string, where the first
byte or word defines the length, and the pointer points to the length.
Never seen anyone use that in open source. Most open source C code that
needs to be efficient in the handling of a string of variable length
will keep a separate int variable with the length.

> Yes. It will allow to use printf's specification like %.*s for example,
> it allow to help formating output w/o overhead caused by using strlen()
> for computing of a string length.

I claim the overhead is insignificant, however you may have a point for
critical systems on older hardware.

> > If it doesn't work easily
> > for OpenVMS users, why can't you create an OpenVMS abstraction layer?
> For what?
> It need to add length for an every string parameter and it's all.

That's right. Or ask the authors of the package how they would solve
the problem of having to use strlen() on the returned strings?

I suggest that you identify the function calls on which this is critical
(i.e. not the login sequence but the return of data from the SQL server)
and suggest a way to solve it. You might have already done this with
your patch, but I couldn't work it out, because it wasn't in UNIX diff
format. I'll have another look.

Right, I see what you are doing. You are adding the column length to
the tds_column_info struct. That will help.

--
James Cameron (james.cameron AT compaq.com)

http://quozl.linux.org.au/ (or) http://quozl.netrek.org/




Archive powered by MHonArc 2.6.24.

Top of Page