Skip to Content.
Sympa Menu

freetds - Re: One for Brian, I think...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brian Bruns" <camber AT ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: One for Brian, I think...
  • Date: Fri, 27 Sep 2002 09:24:33 -0400


>From first blush it looks like the right and proper thing to do. You have
my blessing (like you need it!).

Brian

> ...although please feel free to chip in if you have a view...
>
> I'm wanting to implement some of the ct-library option flags that can be
> manipulated with ct_config(), a function that is currently unimplemented.
>
> In order to do this, I'm going to need somewhere to store them. I thought
> I'd ask your opinion, as I'm not *really* an expert in the ct-library
> code.
>
> ct_config() is defined as follows:
>
> CS_RETCODE ct_config(CS_CONTEXT *ctx, CS_INT action, CS_INT property,
> CS_VOID *buffer, CS_INT buflen, CS_INT *outlen)
>
> given this, it seemd logical to me to store these flags somewhere in the
> CS_CONTEXT structure. This is currenty defined as follows:
>
> typedef struct cs_context
> {
> CS_INT date_convert_fmt;
> int (*_clientmsg_cb)(void*, void*, void*);
> int (*_servermsg_cb)(void*, void*, void*);
> TDSCONTEXT *tds_ctx;
> } CS_CONTEXT;
>
> As these flags are for ct-library only. It made sense to me to store them
> in the CS_CONTEXT structure itself, rather than the TDSCONTEXT structure
> therein.
>
> So, what I propose to do is as follows:
>
> typedef struct cs_config
> {
> short cs_expose_formats;
> } CS_CONFIG;
>
> typedef struct cs_context
> {
> CS_INT date_convert_fmt;
> int (*_clientmsg_cb)(void*, void*, void*);
> int (*_servermsg_cb)(void*, void*, void*);
> TDSCONTEXT *tds_ctx;
> CS_CONFIG config;
> } CS_CONTEXT;
>
> where "cs_expose_formats" is the particular flag I am interested in
> implementing at the moment. More would be added to the CS_CONFIG structure
> as and when we support them.
>
> I'd like to get your opinion on whether I've done the right thing.
>
> Bill




Archive powered by MHonArc 2.6.24.

Top of Page