Skip to Content.
Sympa Menu

freetds - RE: [freetds] errno and threads

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] errno and threads
  • Date: Tue, 5 Aug 2003 16:41:45 +0200


>
> > Another issue about iconv. I'm going to change iconv stuff using an
> > abstract interface...
>
> You mean something along the lines of funopen(3), with I/O
> function pointers instead of buffers? That might be OK. I
> looked at it, but I didn't see much leverage. Everything
> ultimately comes down to translating buffers, and not all the
> data are subject to conversion. Something has to interpret
> the data stream and separate the character data from nonchar
> data, so there's no notion of plugging iconv() into a socket.
>
> Could you give me a clearer idea of what you have in mind?
>

What I aim most is to separate iconv code. tdsiconv.h and iconv_t system
type should be used onlt by iconv.c.
(I found also an old mail with same hints...)
Mainly we need some functions
- initialization
- free
- getting a conversion (should return just a undefined pointer)
how to retrieve/cache server/default conversions ??
- convert (using previous pointer)
I don't have still a clear idea.

About funopen... I don't know... I have to resolve some problems before
starting coding
1- how to get ratio transformation (token.c)
2- avoid iconv_t use (bcp.c)
2 suggest my an idea similart to funopen. Only slightly different
structures
typedef struct tds_read
{
/** pointer to position to read */
TDS_CHAR *ptr;
/** pointer to buffer end */
TDS_CHAR *end;
/** fill again buffer */
int (*read)(struct tds_read* rd);
} TDSREAD;

typedef struct tds_write
{
/** pointer to position to write */
TDS_CHAR *ptr;
/** pointer to buffer end */
TDS_CHAR *end;
/** flush buffer */
int (*write)(struct tds_read* rd);
} TDSWRITE;

int tds_conv(TDSSOCKET*, TDSICONVINFO*, TDSREAD*, TDSWRITE*);
direction, others ??
(why iconv ? IMHO conv it's a more portable name)

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page