From: Stephen D. <sd...@us...> - 2005-06-15 20:22:23
|
Update of /cvsroot/naviserver/modules/nsdbpg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6452 Modified Files: ChangeLog Makefile nsdbpg.c Added Files: dbpg.h tclcmds.c Removed Files: nsdbpg.h Log Message: * nsdbpg.c: Untabify, reindent and reorganize. Drop emulation code for AOLserver 2.x ns_table etc. commands. * tclcmds.c: Split extra Tcl commands and bind vaiable emulation code into new file. * nsdbpg.h: * dbpg.h: Rename header to reflect it's private status. Move all private declarations into c files, leaving just the handle structure shared module wide. * Makefile: Remove all the crud. Index: nsdbpg.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsdbpg/nsdbpg.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nsdbpg.c 15 Jun 2005 02:38:27 -0000 1.1.1.1 --- nsdbpg.c 15 Jun 2005 20:22:11 -0000 1.2 *************** *** 27,40 **** * version of this file under either the License or the GPL. * - * $Header$ */ ! #include "nsdbpg.h" ! DllExport int Ns_ModuleVersion = 1; ! static char datestyle[STRING_BUF_LEN]; [...2579 lines suppressed...] - for (i = 0; i < tinfo->ncolumns; i++) - { - char *cname = tinfo->columns[i]->name; - if ( (cname == name) - || ((cname == NULL) && (name == NULL)) - || (strcmp(cname, name) == 0)) - { - result = i; - break; - } - } - - return (result); - - } /* Ns_DbColumnIndex */ - - - #endif /* FOR_ACS_USE */ - #endif /* NS_AOLSERVER_3_PLUS */ --- 796,797 ---- --- NEW FILE: dbpg.h --- /* * The contents of this file are subject to the AOLserver Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://aolserver.com/. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * The Original Code is AOLserver Code and related documentation * distributed by AOL. * * The Initial Developer of the Original Code is America Online, * Inc. Portions created by AOL are Copyright (C) 1999 America Online, * Inc. All Rights Reserved. * * Alternatively, the contents of this file may be used under the terms * of the GNU General Public License (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish * to allow use of your version of this file only under the terms of the * GPL and not to allow others to use your version of this file under the * License, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the GPL. * If you do not delete the provisions above, a recipient may use your * version of this file under either the License or the GPL. * */ /* * dbpg.h -- * * Private types and declarations for the nsdbpg module. * * $Header: /cvsroot/naviserver/modules/nsdbpg/dbpg.h,v 1.1 2005/06/15 20:22:11 sdeasey Exp $ */ #ifndef DBPG_H #define DBPG_H #include "nsdb.h" #include "libpq-fe.h" /* * The following structure maintains per handle data * specific to postgres. */ typedef struct NsPgConn { PGconn *conn; unsigned int cNum; PGresult *res; int nCols; int nTuples; int curTuple; int in_transaction; } NsPgConn; extern char *PgDbName; extern int Ns_PgServerInit(char *hServer, char *hModule, char *hDriver); #endif /* DBPG_H */ Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/modules/nsdbpg/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ChangeLog 15 Jun 2005 02:38:27 -0000 1.1.1.1 --- ChangeLog 15 Jun 2005 20:22:11 -0000 1.2 *************** *** 1,2 **** --- 1,14 ---- + 2005-06-15 Stephen Deasey <sd...@us...> + + * nsdbpg.c: Untabify, reindent and reorganize. Drop emulation code + for AOLserver 2.x ns_table etc. commands. + * tclcmds.c: Split extra Tcl commands and bind vaiable emulation + code into new file. + * nsdbpg.h: + * dbpg.h: Rename header to reflect it's private status. Move all + private declarations into c files, leaving just the handle + structure shared module wide. + * Makefile: Remove all the crud. + 2005-06-14 Stephen Deasey <sd...@us...> --- NEW FILE: tclcmds.c --- /* * The contents of this file are subject to the AOLserver Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://aolserver.com/. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * The Original Code is AOLserver Code and related documentation * distributed by AOL. * * The Initial Developer of the Original Code is America Online, * Inc. Portions created by AOL are Copyright (C) 1999 America Online, * Inc. All Rights Reserved. * * Alternatively, the contents of this file may be used under the terms [...1044 lines suppressed...] return c; } static void decode3(unsigned char *p, char *buf, int n) { char c1, c2, c3, c4; c1 = get_one(p[0]); c2 = get_one(p[1]); c3 = get_one(p[2]); c4 = get_one(p[3]); if (n >= 1) *buf++ = DEC(c1) << 2 | DEC(c2) >> 4; if (n >= 2) *buf++ = DEC(c2) << 4 | DEC(c3) >> 2; if (n >= 3) *buf++ = DEC(c3) << 6 | DEC(c4); } Index: Makefile =================================================================== RCS file: /cvsroot/naviserver/modules/nsdbpg/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 15 Jun 2005 02:38:27 -0000 1.1.1.1 --- Makefile 15 Jun 2005 20:22:11 -0000 1.2 *************** *** 34,38 **** MODNAME = nsdbpg MOD = nsdbpg.so ! MODOBJS = nsdbpg.o MODLIBS = -lnsdb -lpq --- 34,39 ---- MODNAME = nsdbpg MOD = nsdbpg.so ! MODOBJS = nsdbpg.o tclcmds.o ! HDRS = dbpg.h MODLIBS = -lnsdb -lpq --- nsdbpg.h DELETED --- |