Commit 87b75b77 authored by Sergei Golubchik's avatar Sergei Golubchik

10.0-connect

parents 722dc78d cfa872f6
...@@ -23,15 +23,15 @@ array.cpp blkfil.cpp colblk.cpp csort.cpp ...@@ -23,15 +23,15 @@ array.cpp blkfil.cpp colblk.cpp csort.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filamzip.cpp filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filamzip.cpp
filter.cpp maputil.cpp myutil.cpp plgdbutl.cpp reldef.cpp tabcol.cpp filter.cpp maputil.cpp myutil.cpp plgdbutl.cpp reldef.cpp tabcol.cpp
tabdos.cpp tabfix.cpp tabfmt.cpp table.cpp tabmul.cpp taboccur.cpp tabdos.cpp tabfix.cpp tabfmt.cpp table.cpp tabmul.cpp taboccur.cpp
tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabxcl.cpp tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabvir.cpp
valblk.cpp value.cpp xindex.cpp xobject.cpp tabxcl.cpp valblk.cpp value.cpp xindex.cpp xobject.cpp
array.h blkfil.h block.h catalog.h checklvl.h colblk.h connect.h csort.h array.h blkfil.h block.h catalog.h checklvl.h colblk.h connect.h csort.h
engmsg.h filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h engmsg.h filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h
filter.h global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h filter.h global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h
os.h osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h os.h osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h
tabdos.h tabfix.h tabfmt.h tabmul.h taboccur.h tabpivot.h tabsys.h tabdos.h tabfix.h tabfmt.h tabmul.h taboccur.h tabpivot.h tabsys.h
tabtbl.h tabutil.h tabvct.h tabxcl.h user_connect.h valblk.h value.h tabtbl.h tabutil.h tabvct.h tabvir.h tabxcl.h user_connect.h valblk.h value.h
xindex.h xobject.h xtable.h) xindex.h xobject.h xtable.h)
# #
......
...@@ -51,11 +51,6 @@ ...@@ -51,11 +51,6 @@
#define ASSERT(B) #define ASSERT(B)
#endif #endif
/***********************************************************************/
/* Static variables. */
/***********************************************************************/
extern "C" int trace;
/***********************************************************************/ /***********************************************************************/
/* DB static external variables. */ /* DB static external variables. */
/***********************************************************************/ /***********************************************************************/
......
...@@ -39,11 +39,6 @@ ...@@ -39,11 +39,6 @@
#include "array.h" // ARRAY classes dcls #include "array.h" // ARRAY classes dcls
#include "blkfil.h" // Block Filter classes dcls #include "blkfil.h" // Block Filter classes dcls
/***********************************************************************/
/* Static variables. */
/***********************************************************************/
extern "C" int trace;
/* ------------------------ Class BLOCKFILTER ------------------------ */ /* ------------------------ Class BLOCKFILTER ------------------------ */
/***********************************************************************/ /***********************************************************************/
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include "xindex.h" #include "xindex.h"
#include "xtable.h" #include "xtable.h"
extern "C" int trace;
/***********************************************************************/ /***********************************************************************/
/* COLBLK protected constructor. */ /* COLBLK protected constructor. */
/***********************************************************************/ /***********************************************************************/
......
...@@ -48,11 +48,6 @@ ...@@ -48,11 +48,6 @@
#define my_strlwr(p) my_casedn_str(default_charset_info, (p)); #define my_strlwr(p) my_casedn_str(default_charset_info, (p));
#define my_stricmp(a, b) my_strcasecmp(default_charset_info, (a), (b)) #define my_stricmp(a, b) my_strcasecmp(default_charset_info, (a), (b))
/***********************************************************************/
/* DB static variables. */
/***********************************************************************/
extern "C" int trace;
/***********************************************************************/ /***********************************************************************/
/* Routines called internally by semantic routines. */ /* Routines called internally by semantic routines. */
/***********************************************************************/ /***********************************************************************/
...@@ -281,16 +276,13 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2, ...@@ -281,16 +276,13 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
if (trace) if (trace)
printf("Allocating column %s\n", p); printf("Allocating column %s\n", p);
// if (*p == '*') { g->Message[0] = 0; // To check whether ColDB made an error message
// // This is a special column
// cp= new(g) COLUMN(p + 1);
// cp->SetTo_Table(tdbp->GetTable());
// colp= ((PTDBASE)tdbp)->InsertSpcBlk(g, cp);
// } else
colp= tdbp->ColDB(g, p, 0); colp= tdbp->ColDB(g, p, 0);
if (!colp) { if (!colp && !(mode == MODE_INSERT && tdbp->IsSpecial(p))) {
sprintf(g->Message, "Column %s not found in %s", p, tdbp->GetName()); if (g->Message[0] == 0)
sprintf(g->Message, MSG(COL_ISNOT_TABLE), p, tdbp->GetName());
goto err; goto err;
} // endif colp } // endif colp
...@@ -659,8 +651,10 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) ...@@ -659,8 +651,10 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted)
if (!ptdb) if (!ptdb)
return -1; return -1;
else if (!((PTDBASE)ptdb)->GetDef()->Indexable()) { else if (!((PTDBASE)ptdb)->GetDef()->Indexable()) {
sprintf(g->Message, "CntIndexInit: Table %s is not indexable", ptdb->GetName()); sprintf(g->Message, MSG(TABLE_NO_INDEX), ptdb->GetName());
return 0; return 0;
} else if (((PTDBASE)ptdb)->GetDef()->Indexable() == 3) {
return 1;
} else } else
tdbp= (PTDBDOX)ptdb; tdbp= (PTDBDOX)ptdb;
...@@ -730,13 +724,21 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, ...@@ -730,13 +724,21 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op,
x= ((PTDBASE)ptdb)->GetDef()->Indexable(); x= ((PTDBASE)ptdb)->GetDef()->Indexable();
if (!x) { if (!x) {
sprintf(g->Message, "CntIndexRead: Table %s is not indexable", ptdb->GetName()); sprintf(g->Message, MSG(TABLE_NO_INDEX), ptdb->GetName());
return RC_FX; return RC_FX;
} else if (x == 2) { } else if (x == 2) {
// Remote index // Remote index
if (ptdb->ReadKey(g, op, key, len)) if (ptdb->ReadKey(g, op, key, len))
return RC_FX; return RC_FX;
goto rnd;
} else if (x == 3) {
if (key)
((PTDBASE)ptdb)->SetRecpos(g, *(int*)key);
if (op == OP_SAME)
return RC_NF;
goto rnd; goto rnd;
} else } else
tdbp= (PTDBDOX)ptdb; tdbp= (PTDBDOX)ptdb;
...@@ -836,12 +838,21 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, ...@@ -836,12 +838,21 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
x= ((PTDBASE)ptdb)->GetDef()->Indexable(); x= ((PTDBASE)ptdb)->GetDef()->Indexable();
if (!x) { if (!x) {
sprintf(g->Message, "CntIndexRange: Table %s is not indexable", ptdb->GetName()); sprintf(g->Message, MSG(TABLE_NO_INDEX), ptdb->GetName());
DBUG_PRINT("Range", ("%s", g->Message)); DBUG_PRINT("Range", ("%s", g->Message));
return -1; return -1;
} else if (x == 2) { } else if (x == 2) {
// Remote index // Remote index
return 2; return 2;
} else if (x == 3) {
// Virtual index
for (i= 0; i < 2; i++)
if (key[i])
k[i] = *(int*)key[i] + (incl[i] ? 0 : 1 - 2 * i);
else
k[i] = (i) ? ptdb->Cardinality(g) : 1;
return k[1] - k[0] + 1;
} else } else
tdbp= (PTDBDOX)ptdb; tdbp= (PTDBDOX)ptdb;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
case IDS_TABLES: p = "Table Headers"; break;
case IDS_TAB_01: p = "Table_Cat"; break;
case IDS_TAB_02: p = "Table_Schema"; break;
case IDS_TAB_03: p = "Table_Name"; break;
case IDS_TAB_04: p = "Table_Type"; break;
case IDS_TAB_05: p = "Remark"; break;
case IDS_COLUMNS: p = "Column Headers"; break;
case IDS_COL_01: p = "Table_Cat"; break;
case IDS_COL_02: p = "Table_Schema"; break;
case IDS_COL_03: p = "Table_Name"; break;
case IDS_COL_04: p = "Column_Name"; break;
case IDS_COL_05: p = "Data_Type"; break;
case IDS_COL_06: p = "Type_Name"; break;
case IDS_COL_07: p = "Column_Size"; break;
case IDS_COL_08: p = "Buffer_Length"; break;
case IDS_COL_09: p = "Decimal_Digits"; break;
case IDS_COL_10: p = "Radix"; break;
case IDS_COL_11: p = "Nullable"; break;
case IDS_COL_12: p = "Remarks"; break;
case IDS_PKEY: p = "Key Headers"; break;
case IDS_PKY_01: p = "Table_Catalog"; break;
case IDS_PKY_02: p = "Table_Schema"; break;
case IDS_PKY_03: p = "Table_Name"; break;
case IDS_PKY_04: p = "Column_Name"; break;
case IDS_PKY_05: p = "Key_Seq"; break;
case IDS_PKY_06: p = "Pk_Name"; break;
case IDS_STAT: p = "Stat Headers"; break;
case IDS_STA_01: p = "Table_Catalog"; break;
case IDS_STA_02: p = "Table_Schema"; break;
case IDS_STA_03: p = "Table_Name"; break;
case IDS_STA_04: p = "Non_Unique"; break;
case IDS_STA_05: p = "Index_Qualifier"; break;
case IDS_STA_06: p = "Index_Name"; break;
case IDS_STA_07: p = "Type"; break;
case IDS_STA_08: p = "Seq_in_Index"; break;
case IDS_STA_09: p = "Column_Name"; break;
case IDS_STA_10: p = "Collation"; break;
case IDS_STA_11: p = "Cardinality"; break;
case IDS_STA_12: p = "Pages"; break;
case IDS_STA_13: p = "Filter_Condition"; break;
case IDS_DRIVER: p = "Driver Headers"; break;
case IDS_DRV_01: p = "Description"; break;
case IDS_DRV_02: p = "Attributes"; break;
case IDS_DSRC: p = "DataSrc Headers"; break;
case IDS_DSC_01: p = "Name"; break;
case IDS_DSC_02: p = "Description"; break;
...@@ -46,8 +46,6 @@ ...@@ -46,8 +46,6 @@
#include "filamap.h" #include "filamap.h"
#include "tabdos.h" #include "tabdos.h"
extern "C" int trace;
/* --------------------------- Class MAPFAM -------------------------- */ /* --------------------------- Class MAPFAM -------------------------- */
/***********************************************************************/ /***********************************************************************/
...@@ -360,7 +358,12 @@ int MAPFAM::ReadBuffer(PGLOBAL g) ...@@ -360,7 +358,12 @@ int MAPFAM::ReadBuffer(PGLOBAL g)
while (*Mempos++ != '\n') ; // What about Unix ??? while (*Mempos++ != '\n') ; // What about Unix ???
// Set caller line buffer // Set caller line buffer
len = (Mempos - Fpos) - Ending; len = (Mempos - Fpos) - 1;
// Don't rely on ENDING setting
if (len > 0 && *(Mempos - 2) == '\r')
len--; // Line ends by CRLF
memcpy(Tdbp->GetLine(), Fpos, len); memcpy(Tdbp->GetLine(), Fpos, len);
Tdbp->GetLine()[len] = '\0'; Tdbp->GetLine()[len] = '\0';
return RC_OK; return RC_OK;
......
...@@ -63,8 +63,6 @@ ...@@ -63,8 +63,6 @@
#define DBFTYPE 3 /* value of bits 0 and 1 if .dbf */ #define DBFTYPE 3 /* value of bits 0 and 1 if .dbf */
#define EOH 0x0D /* end-of-header marker in .dbf file */ #define EOH 0x0D /* end-of-header marker in .dbf file */
extern "C" int trace; // The general trace value
/****************************************************************************/ /****************************************************************************/
/* First 32 bytes of a .dbf file. */ /* First 32 bytes of a .dbf file. */
/* Note: some reserved fields are used here to store info (Fields) */ /* Note: some reserved fields are used here to store info (Fields) */
...@@ -286,7 +284,8 @@ PQRYRES DBFColumns(PGLOBAL g, char *dp, const char *fn, bool info) ...@@ -286,7 +284,8 @@ PQRYRES DBFColumns(PGLOBAL g, char *dp, const char *fn, bool info)
break; break;
default: default:
if (!info) { if (!info) {
sprintf(g->Message, MSG(BAD_DBF_TYPE), thisfield.Type); sprintf(g->Message, MSG(BAD_DBF_TYPE), thisfield.Type
, thisfield.Name);
goto err; goto err;
} // endif info } // endif info
...@@ -587,7 +586,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g) ...@@ -587,7 +586,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
case 'D': // Date case 'D': // Date
break; break;
default: // Should never happen default: // Should never happen
sprintf(g->Message, "Unsupported DBF type %c for column %s", sprintf(g->Message, MSG(BAD_DBF_TYPE),
c, cdp->GetName()); c, cdp->GetName());
return true; return true;
} // endswitch c } // endswitch c
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#define INVALID_SET_FILE_POINTER 0xFFFFFFFF #define INVALID_SET_FILE_POINTER 0xFFFFFFFF
#endif #endif
extern "C" int trace;
extern int num_read, num_there, num_eq[2]; // Statistics extern int num_read, num_there, num_eq[2]; // Statistics
/* --------------------------- Class FIXFAM -------------------------- */ /* --------------------------- Class FIXFAM -------------------------- */
...@@ -131,19 +130,50 @@ bool FIXFAM::AllocateBuffer(PGLOBAL g) ...@@ -131,19 +130,50 @@ bool FIXFAM::AllocateBuffer(PGLOBAL g)
/*******************************************************************/ /*******************************************************************/
/* For Insert the buffer must be prepared. */ /* For Insert the buffer must be prepared. */
/*******************************************************************/ /*******************************************************************/
memset(To_Buf, ' ', Buflen); if (Tdbp->GetFtype() == RECFM_BIN) {
// The buffer must be prepared depending on column types
int n = 0;
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
PCOLDEF cdp;
// Prepare the first line of the buffer
memset(To_Buf, 0, Buflen);
for (cdp = defp->GetCols(); cdp; cdp = cdp->GetNext()) {
if (IsTypeNum(cdp->GetType()))
memset(To_Buf + cdp->GetOffset(), ' ', cdp->GetClen());
n = MY_MAX(n, cdp->GetPoff() + cdp->GetClen());
} // endfor cdp
if (/*Tdbp->GetFtype() < 2 &&*/ !Padded) // We do this for binary table because the lrecl can have been
// If not binary, the file is physically a text file.
// We do it also for binary table because the lrecl can have been
// specified with additional space to include line ending. // specified with additional space to include line ending.
if (n < Lrecl && Ending) {
To_Buf[Lrecl - 1] = '\n';
if (n < Lrecl - 1 && Ending == 2)
To_Buf[Lrecl - 2] = '\r';
} // endif n
// Now repeat this for the whole buffer
for (int len = Lrecl; len <= Buflen - Lrecl; len += Lrecl)
memcpy(To_Buf + len, To_Buf, Lrecl);
} else {
memset(To_Buf, ' ', Buflen);
if (!Padded)
// The file is physically a text file.
for (int len = Lrecl; len <= Buflen; len += Lrecl) { for (int len = Lrecl; len <= Buflen; len += Lrecl) {
#if defined(WIN32) if (Ending == 2)
To_Buf[len - 2] = '\r'; To_Buf[len - 2] = '\r';
#endif // WIN32
To_Buf[len - 1] = '\n'; To_Buf[len - 1] = '\n';
} // endfor len } // endfor len
} // endif Ftype
Rbuf = Nrec; // To be used by WriteDB Rbuf = Nrec; // To be used by WriteDB
} // endif Insert } // endif Insert
...@@ -205,7 +235,7 @@ int FIXFAM::WriteModifiedBlock(PGLOBAL g) ...@@ -205,7 +235,7 @@ int FIXFAM::WriteModifiedBlock(PGLOBAL g)
// NOTE: Next line was added to avoid a very strange fread bug. // NOTE: Next line was added to avoid a very strange fread bug.
// When the fseek is not executed (even the file has the good // When the fseek is not executed (even the file has the good
// pointer position) the next read can happen anywhere in the file. // pointer position) the next read can happen anywhere in the file.
OldBlk = CurBlk; // This will force fseek to be executed OldBlk = -2; // This will force fseek to be executed
Modif = 0; Modif = 0;
return rc; return rc;
} // end of WriteModifiedBlock } // end of WriteModifiedBlock
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#endif #endif
extern int num_read, num_there, num_eq[2]; // Statistics extern int num_read, num_there, num_eq[2]; // Statistics
extern "C" int trace;
/***********************************************************************/ /***********************************************************************/
/* Routine called externally by TXTFAM SortedRows functions. */ /* Routine called externally by TXTFAM SortedRows functions. */
...@@ -538,7 +537,8 @@ bool DOSFAM::OpenTableFile(PGLOBAL g) ...@@ -538,7 +537,8 @@ bool DOSFAM::OpenTableFile(PGLOBAL g)
PDBUSER dbuserp = PlgGetUser(g); PDBUSER dbuserp = PlgGetUser(g);
// This is required when using Unix files under Windows and vice versa // This is required when using Unix files under Windows and vice versa
Bin = (Blocked || Ending != CRLF); //Bin = (Blocked || Ending != CRLF);
Bin = true; // To avoid ftell problems
switch (mode) { switch (mode) {
case MODE_READ: case MODE_READ:
...@@ -684,6 +684,7 @@ bool DOSFAM::RecordPos(PGLOBAL g) ...@@ -684,6 +684,7 @@ bool DOSFAM::RecordPos(PGLOBAL g)
{ {
if ((Fpos = ftell(Stream)) < 0) { if ((Fpos = ftell(Stream)) < 0) {
sprintf(g->Message, MSG(FTELL_ERROR), 0, strerror(errno)); sprintf(g->Message, MSG(FTELL_ERROR), 0, strerror(errno));
// strcat(g->Message, " (possible wrong ENDING option value)");
return true; return true;
} // endif Fpos } // endif Fpos
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
extern int num_read, num_there; // Statistics extern int num_read, num_there; // Statistics
static int num_write; static int num_write;
extern "C" int trace;
#if defined(UNIX) #if defined(UNIX)
// Add dummy strerror (NGC) // Add dummy strerror (NGC)
...@@ -388,15 +387,20 @@ bool VCTFAM::MakeEmptyFile(PGLOBAL g, char *fn) ...@@ -388,15 +387,20 @@ bool VCTFAM::MakeEmptyFile(PGLOBAL g, char *fn)
n = (Header == 1 || Header == 3) ? sizeof(VECHEADER) : 0; n = (Header == 1 || Header == 3) ? sizeof(VECHEADER) : 0;
if (lseek(h, n + MaxBlk * Nrec * Lrecl - 1, SEEK_SET) == -1) { if (lseek(h, n + MaxBlk * Nrec * Lrecl - 1, SEEK_SET) < 0)
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno)); goto err;
close(h);
return true; // This actually fills the empty file
} // endif h if (write(h, &c, 1) < 0)
goto err;
write(h, &c, 1); // This actually fills the empty file
close(h); close(h);
return false; return false;
err:
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
close(h);
return true;
} // end of MakeEmptyFile } // end of MakeEmptyFile
/***********************************************************************/ /***********************************************************************/
...@@ -3393,15 +3397,20 @@ bool BGVFAM::MakeEmptyFile(PGLOBAL g, char *fn) ...@@ -3393,15 +3397,20 @@ bool BGVFAM::MakeEmptyFile(PGLOBAL g, char *fn)
htrc("MEF: pos=%lld n=%d maxblk=%d blksize=%d\n", htrc("MEF: pos=%lld n=%d maxblk=%d blksize=%d\n",
pos, n, MaxBlk, Blksize); pos, n, MaxBlk, Blksize);
if (lseek64(h, pos, SEEK_SET) < 0) { if (lseek64(h, pos, SEEK_SET) < 0)
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno)); goto err;
close(h);
return true; // This actually fills the empty file
} // endif h if (write(h, &c, 1) < 0)
goto err;
write(h, &c, 1); // This actually fills the empty file
close(h); close(h);
return false; return false;
err:
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
close(h);
return true;
#endif // !WIN32 #endif // !WIN32
} // end of MakeEmptyFile } // end of MakeEmptyFile
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
/* DB static variables. */ /* DB static variables. */
/***********************************************************************/ /***********************************************************************/
extern int num_read, num_there, num_eq[]; // Statistics extern int num_read, num_there, num_eq[]; // Statistics
extern "C" int trace;
/* ------------------------------------------------------------------- */ /* ------------------------------------------------------------------- */
......
...@@ -39,11 +39,6 @@ ...@@ -39,11 +39,6 @@
//#include "select.h" //#include "select.h"
#include "xindex.h" #include "xindex.h"
/***********************************************************************/
/* Static variables. */
/***********************************************************************/
extern "C" int trace;
/***********************************************************************/ /***********************************************************************/
/* Utility routines. */ /* Utility routines. */
/***********************************************************************/ /***********************************************************************/
...@@ -106,7 +101,7 @@ PFIL MakeFilter(PGLOBAL g, PFIL fp1, OPVAL vop, PFIL fp2) ...@@ -106,7 +101,7 @@ PFIL MakeFilter(PGLOBAL g, PFIL fp1, OPVAL vop, PFIL fp2)
PFIL filp = new(g) FILTER(g, vop); PFIL filp = new(g) FILTER(g, vop);
filp->Arg(0) = fp1; filp->Arg(0) = fp1;
filp->Arg(1) = fp2; filp->Arg(1) = (fp2) ? fp2 : pXVOID;
if (filp->Convert(g, false)) if (filp->Convert(g, false))
return NULL; return NULL;
......
This diff is collapsed.
This diff is collapsed.
case IDS_TABLES: p = "Table Enttes"; break;
case IDS_TAB_01: p = "Catalogue"; break;
case IDS_TAB_02: p = "Schma"; break;
case IDS_TAB_03: p = "Nom"; break;
case IDS_TAB_04: p = "Type"; break;
case IDS_TAB_05: p = "Remarque"; break;
case IDS_COLUMNS: p = "Colonne Enttes"; break;
case IDS_COL_01: p = "Cat_Table"; break;
case IDS_COL_02: p = "Schem_Table"; break;
case IDS_COL_03: p = "Nom_Table"; break;
case IDS_COL_04: p = "Nom_Colonne"; break;
case IDS_COL_05: p = "Type_Donnes"; break;
case IDS_COL_06: p = "Nom_Type"; break;
case IDS_COL_07: p = "Prcision"; break;
case IDS_COL_08: p = "Longueur"; break;
case IDS_COL_09: p = "Echelle"; break;
case IDS_COL_10: p = "Base"; break;
case IDS_COL_11: p = "Nullifiable"; break;
case IDS_COL_12: p = "Remarques"; break;
case IDS_PKEY: p = "Cl Enttes"; break;
case IDS_PKY_01: p = "Cat_Table"; break;
case IDS_PKY_02: p = "Schem_Table"; break;
case IDS_PKY_03: p = "Nom_Table"; break;
case IDS_PKY_04: p = "Nom_Colonne"; break;
case IDS_PKY_05: p = "Numro_Cl"; break;
case IDS_PKY_06: p = "Nom_Cl"; break;
case IDS_STAT: p = "Stat Enttes"; break;
case IDS_STA_01: p = "Table_Catalog"; break;
case IDS_STA_02: p = "Table_Schema"; break;
case IDS_STA_03: p = "Table_Name"; break;
case IDS_STA_04: p = "Non_Unique"; break;
case IDS_STA_05: p = "Index_Qualifier"; break;
case IDS_STA_06: p = "Index_Name"; break;
case IDS_STA_07: p = "Type"; break;
case IDS_STA_08: p = "Seq_in_Index"; break;
case IDS_STA_09: p = "Column_Name"; break;
case IDS_STA_10: p = "Collation"; break;
case IDS_STA_11: p = "Cardinality"; break;
case IDS_STA_12: p = "Pages"; break;
case IDS_STA_13: p = "Filter_Condition"; break;
case IDS_DRIVER: p = "Driver Enttes"; break;
case IDS_DRV_01: p = "Description"; break;
case IDS_DRV_02: p = "Attributs"; break;
case IDS_DSRC: p = "DataSrc Enttes"; break;
case IDS_DSC_01: p = "Nom"; break;
case IDS_DSC_02: p = "Description"; break;
This diff is collapsed.
...@@ -24,11 +24,13 @@ ...@@ -24,11 +24,13 @@
#endif #endif
#if defined(XMSG) #if defined(XMSG)
//#error Option XMSG is not yet fully implemented
// Definition used to read messages from message file. // Definition used to read messages from message file.
#include "msgid.h" #include "msgid.h"
#define MSG(I) PlugReadMessage(NULL, MSG_##I, #I) #define MSG(I) PlugReadMessage(NULL, MSG_##I, #I)
#define STEP(I) PlugReadMessage(g, MSG_##I, #I) #define STEP(I) PlugReadMessage(g, MSG_##I, #I)
#elif defined(NEWMSG) #elif defined(NEWMSG)
//#error Option NEWMSG is not yet fully implemented
// Definition used to get messages from resource. // Definition used to get messages from resource.
#include "msgid.h" #include "msgid.h"
#define MSG(I) PlugGetMessage(NULL, MSG_##I) #define MSG(I) PlugGetMessage(NULL, MSG_##I)
...@@ -46,6 +48,11 @@ ...@@ -46,6 +48,11 @@
#define CRLF 1 #define CRLF 1
#endif // !WIN32 #endif // !WIN32
/***********************************************************************/
/* Define access to the thread based trace value. */
/***********************************************************************/
#define trace GetTraceValue()
/***********************************************************************/ /***********************************************************************/
/* Miscellaneous Constants */ /* Miscellaneous Constants */
/***********************************************************************/ /***********************************************************************/
...@@ -255,6 +262,7 @@ DllExport void *PlugSubAlloc(PGLOBAL, void *, size_t); ...@@ -255,6 +262,7 @@ DllExport void *PlugSubAlloc(PGLOBAL, void *, size_t);
DllExport char *PlugDup(PGLOBAL g, const char *str); DllExport char *PlugDup(PGLOBAL g, const char *str);
DllExport void *MakePtr(void *, OFFSET); DllExport void *MakePtr(void *, OFFSET);
DllExport void htrc(char const *fmt, ...); DllExport void htrc(char const *fmt, ...);
DllExport int GetTraceValue(void);
#if defined(__cplusplus) #if defined(__cplusplus)
} // extern "C" } // extern "C"
......
This diff is collapsed.
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#pragma interface /* gcc class implementation */ #pragma interface /* gcc class implementation */
#endif #endif
static char *strz(PGLOBAL g, LEX_STRING &ls);
/****************************************************************************/ /****************************************************************************/
/* Structures used to pass info between CONNECT and ha_connect. */ /* Structures used to pass info between CONNECT and ha_connect. */
/****************************************************************************/ /****************************************************************************/
...@@ -177,13 +179,16 @@ class ha_connect: public handler ...@@ -177,13 +179,16 @@ class ha_connect: public handler
protected: protected:
char *PlugSubAllocStr(PGLOBAL g, void *memp, const char *str, size_t length) char *PlugSubAllocStr(PGLOBAL g, void *memp, const char *str, size_t length)
{ {
char *ptr; char *ptr= (char*)PlgDBSubAlloc(g, memp, length + 1);
if (!(ptr= (char*) PlugSubAlloc(g, memp, length + 1)))
return NULL; if (ptr) {
memcpy(ptr, str, length); memcpy(ptr, str, length);
ptr[length]= '\0'; ptr[length]= '\0';
} // endif ptr
return ptr; return ptr;
} } // end of PlugSubAllocStr
public: public:
ha_connect(handlerton *hton, TABLE_SHARE *table_arg); ha_connect(handlerton *hton, TABLE_SHARE *table_arg);
~ha_connect(); ~ha_connect();
...@@ -210,6 +215,7 @@ class ha_connect: public handler ...@@ -210,6 +215,7 @@ class ha_connect: public handler
void *GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf); void *GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf);
PXOS GetIndexOptionStruct(KEY *kp); PXOS GetIndexOptionStruct(KEY *kp);
PIXDEF GetIndexInfo(TABLE_SHARE *s= NULL); PIXDEF GetIndexInfo(TABLE_SHARE *s= NULL);
bool CheckVirtualIndex(TABLE_SHARE *s);
const char *GetDBName(const char *name); const char *GetDBName(const char *name);
const char *GetTableName(void); const char *GetTableName(void);
char *GetPartName(void); char *GetPartName(void);
...@@ -235,6 +241,8 @@ class ha_connect: public handler ...@@ -235,6 +241,8 @@ class ha_connect: public handler
uint key_len= 0); uint key_len= 0);
bool MakeKeyWhere(PGLOBAL g, char *qry, OPVAL op, char *q, bool MakeKeyWhere(PGLOBAL g, char *qry, OPVAL op, char *q,
const void *key, int klen); const void *key, int klen);
inline char *Strz(LEX_STRING &ls);
/** @brief /** @brief
The name that will be used for display purposes. The name that will be used for display purposes.
......
...@@ -180,7 +180,6 @@ class XML2ATTR : public XMLATTRIBUTE { ...@@ -180,7 +180,6 @@ class XML2ATTR : public XMLATTRIBUTE {
extern "C" { extern "C" {
extern char version[]; extern char version[];
extern int trace;
} // "C" } // "C"
#if defined(MEMORY_TRACE) #if defined(MEMORY_TRACE)
......
This diff is collapsed.
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
#if defined(PIVOT_SUPPORT) #if defined(PIVOT_SUPPORT)
#include "tabpivot.h" #include "tabpivot.h"
#endif // PIVOT_SUPPORT #endif // PIVOT_SUPPORT
#include "tabvir.h"
#include "ha_connect.h" #include "ha_connect.h"
#include "mycat.h" #include "mycat.h"
...@@ -98,8 +99,6 @@ ...@@ -98,8 +99,6 @@
extern "C" HINSTANCE s_hModule; // Saved module handle extern "C" HINSTANCE s_hModule; // Saved module handle
#endif // !WIN32 #endif // !WIN32
extern "C" int trace;
PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
/***********************************************************************/ /***********************************************************************/
...@@ -139,6 +138,7 @@ TABTYPE GetTypeID(const char *type) ...@@ -139,6 +138,7 @@ TABTYPE GetTypeID(const char *type)
#ifdef PIVOT_SUPPORT #ifdef PIVOT_SUPPORT
: (!stricmp(type, "PIVOT")) ? TAB_PIVOT : (!stricmp(type, "PIVOT")) ? TAB_PIVOT
#endif #endif
: (!stricmp(type, "VIR")) ? TAB_VIR
: (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY;
} // end of GetTypeID } // end of GetTypeID
...@@ -182,6 +182,7 @@ bool IsExactType(TABTYPE type) ...@@ -182,6 +182,7 @@ bool IsExactType(TABTYPE type)
case TAB_DBF: case TAB_DBF:
// case TAB_XML: depends on Multiple || Xpand || Coltype // case TAB_XML: depends on Multiple || Xpand || Coltype
case TAB_VEC: case TAB_VEC:
case TAB_VIR:
exact= true; exact= true;
break; break;
default: default:
...@@ -280,6 +281,9 @@ int GetIndexType(TABTYPE type) ...@@ -280,6 +281,9 @@ int GetIndexType(TABTYPE type)
// case TAB_ODBC: // case TAB_ODBC:
xtyp= 2; xtyp= 2;
break; break;
case TAB_VIR:
xtyp= 3;
break;
case TAB_ODBC: case TAB_ODBC:
default: default:
xtyp= 0; xtyp= 0;
...@@ -533,6 +537,7 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am) ...@@ -533,6 +537,7 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am)
#if defined(PIVOT_SUPPORT) #if defined(PIVOT_SUPPORT)
case TAB_PIVOT: tdp= new(g) PIVOTDEF; break; case TAB_PIVOT: tdp= new(g) PIVOTDEF; break;
#endif // PIVOT_SUPPORT #endif // PIVOT_SUPPORT
case TAB_VIR: tdp= new(g) VIRDEF; break;
default: default:
sprintf(g->Message, MSG(BAD_TABLE_TYPE), am, name); sprintf(g->Message, MSG(BAD_TABLE_TYPE), am, name);
} // endswitch } // endswitch
......
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
#include "plgcnx.h" // For DB types #include "plgcnx.h" // For DB types
#include "resource.h" #include "resource.h"
//#include "value.h" //#include "value.h"
#include "valblk.h" //#include "valblk.h"
#include "xobject.h"
#define DLL_EXPORT // Items are exported from this DLL #define DLL_EXPORT // Items are exported from this DLL
#include "myconn.h" #include "myconn.h"
extern "C" int trace;
extern "C" int zconv; extern "C" int zconv;
extern MYSQL_PLUGIN_IMPORT uint mysqld_port; extern MYSQL_PLUGIN_IMPORT uint mysqld_port;
extern MYSQL_PLUGIN_IMPORT char *mysqld_unix_port; extern MYSQL_PLUGIN_IMPORT char *mysqld_unix_port;
...@@ -135,7 +135,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db, ...@@ -135,7 +135,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
FLD_REM, FLD_NO, FLD_DEFAULT, FLD_EXTRA, FLD_REM, FLD_NO, FLD_DEFAULT, FLD_EXTRA,
FLD_CHARSET}; FLD_CHARSET};
unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0}; unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0};
char *fld, *colname, *chset, *fmt, v, cmd[128], uns[16], zero[16]; char *fld, *colname, *chset, *fmt, v, buf[128], uns[16], zero[16];
int i, n, nf, ncol = sizeof(buftyp) / sizeof(int); int i, n, nf, ncol = sizeof(buftyp) / sizeof(int);
int len, type, prec, rc, k = 0; int len, type, prec, rc, k = 0;
PQRYRES qrp; PQRYRES qrp;
...@@ -155,16 +155,26 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db, ...@@ -155,16 +155,26 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
/********************************************************************/ /********************************************************************/
/* Do an evaluation of the result size. */ /* Do an evaluation of the result size. */
/********************************************************************/ /********************************************************************/
sprintf(cmd, "SHOW FULL COLUMNS FROM %s", table); STRING cmd(g, 64, "SHOW FULL COLUMNS FROM ");
strcat(strcat(cmd, " FROM "), (db) ? db : PlgGetUser(g)->DBName); bool b = cmd.Append((PSZ)table);
if (colpat) b |= cmd.Append(" FROM ");
strcat(strcat(cmd, " LIKE "), colpat); b |= cmd.Append((PSZ)(db ? db : PlgGetUser(g)->DBName));
if (colpat) {
b |= cmd.Append(" LIKE ");
b |= cmd.Append((PSZ)colpat);
} // endif colpat
if (b) {
strcpy(g->Message, "Out of memory");
return NULL;
} // endif b
if (trace) if (trace)
htrc("MyColumns: cmd='%s'\n", cmd); htrc("MyColumns: cmd='%s'\n", cmd.GetStr());
if ((n = myc.GetResultSize(g, cmd)) < 0) { if ((n = myc.GetResultSize(g, cmd.GetStr())) < 0) {
myc.Close(); myc.Close();
return NULL; return NULL;
} // endif n } // endif n
...@@ -225,15 +235,15 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db, ...@@ -225,15 +235,15 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
*uns = 0; *uns = 0;
*zero = 0; *zero = 0;
switch ((nf = sscanf(fld, "%[^(](%d,%d", cmd, &len, &prec))) { switch ((nf = sscanf(fld, "%[^(](%d,%d", buf, &len, &prec))) {
case 3: case 3:
nf = sscanf(fld, "%[^(](%d,%d) %s %s", cmd, &len, &prec, uns, zero); nf = sscanf(fld, "%[^(](%d,%d) %s %s", buf, &len, &prec, uns, zero);
break; break;
case 2: case 2:
nf = sscanf(fld, "%[^(](%d) %s %s", cmd, &len, uns, zero) + 1; nf = sscanf(fld, "%[^(](%d) %s %s", buf, &len, uns, zero) + 1;
break; break;
case 1: case 1:
nf = sscanf(fld, "%s %s %s", cmd, uns, zero) + 2; nf = sscanf(fld, "%s %s %s", buf, uns, zero) + 2;
break; break;
default: default:
sprintf(g->Message, MSG(BAD_FIELD_TYPE), fld); sprintf(g->Message, MSG(BAD_FIELD_TYPE), fld);
...@@ -241,16 +251,16 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db, ...@@ -241,16 +251,16 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
return NULL; return NULL;
} // endswitch nf } // endswitch nf
if ((type = MYSQLtoPLG(cmd, &v)) == TYPE_ERROR) { if ((type = MYSQLtoPLG(buf, &v)) == TYPE_ERROR) {
if (v == 'K') { if (v == 'K') {
// Skip this column // Skip this column
sprintf(g->Message, "Column %s skipped (unsupported type %s)", sprintf(g->Message, "Column %s skipped (unsupported type %s)",
colname, cmd); colname, buf);
PushWarning(g, thd); PushWarning(g, thd);
continue; continue;
} // endif v } // endif v
sprintf(g->Message, "Column %s unsupported type %s", colname, cmd); sprintf(g->Message, "Column %s unsupported type %s", colname, buf);
myc.Close(); myc.Close();
return NULL; return NULL;
} else if (type == TYPE_STRING) { } else if (type == TYPE_STRING) {
...@@ -276,11 +286,11 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db, ...@@ -276,11 +286,11 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
} // endswitch nf } // endswitch nf
crp = crp->Next; // Type_Name crp = crp->Next; // Type_Name
crp->Kdata->SetValue(cmd, i); crp->Kdata->SetValue(buf, i);
if (type == TYPE_DATE) { if (type == TYPE_DATE) {
// When creating tables we do need info about date columns // When creating tables we do need info about date columns
fmt = MyDateFmt(cmd); fmt = MyDateFmt(buf);
len = strlen(fmt); len = strlen(fmt);
} else } else
fmt = NULL; fmt = NULL;
......
# #
# Checking XCOL tables # Make the children list table
# #
CREATE TABLE chlist ( CREATE TABLE chlist (
mother char(12) NOT NULL COMMENT 'The mother of the listed children', mother char(12) NOT NULL COMMENT 'The mother of the listed children',
...@@ -20,7 +20,10 @@ Lisbeth Lucy,Charles,Diana ...@@ -20,7 +20,10 @@ Lisbeth Lucy,Charles,Diana
Corinne NULL Corinne NULL
Claude Marc Claude Marc
Janet Arthur,Sandra,Peter,John Janet Arthur,Sandra,Peter,John
CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children,port=PORT'; #
# Checking XCOL tables
#
CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children';
SELECT * FROM child; SELECT * FROM child;
mother children mother children
Sophia Vivian Sophia Vivian
...@@ -81,5 +84,34 @@ Corinne 0 ...@@ -81,5 +84,34 @@ Corinne 0
Janet 4 Janet 4
Lisbeth 3 Lisbeth 3
Sophia 2 Sophia 2
#
# Test using special columns
#
CREATE TABLE `child2` (
`row` int NOT NULL SPECIAL=ROWID,
`num` int NOT NULL SPECIAL=ROWNUM,
`mother` varchar(12) NOT NULL COMMENT 'The mother of the children',
`child` varchar(12) NOT NULL COMMENT 'The child name' FLAG=2
) ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist `OPTION_LIST`='colname=child';
SELECT * FROM child2;
row num mother child
1 1 Sophia Vivian
2 2 Sophia Antony
3 1 Lisbeth Lucy
4 2 Lisbeth Charles
5 3 Lisbeth Diana
7 1 Claude Marc
8 1 Janet Arthur
9 2 Janet Sandra
10 3 Janet Peter
11 4 Janet John
# List only first child
SELECT mother, child FROM child2 where num = 1;
mother child
Sophia Vivian
Lisbeth Lucy
Claude Marc
Janet Arthur
DROP TABLE child; DROP TABLE child;
DROP TABLE chlist; DROP TABLE chlist;
DROP TABLE child2;
let $MYSQLD_DATADIR= `select @@datadir`;
let $PORT= `select @@port`;
--echo # --echo #
--echo # Checking XCOL tables --echo # Make the children list table
--echo # --echo #
CREATE TABLE chlist ( CREATE TABLE chlist (
mother char(12) NOT NULL COMMENT 'The mother of the listed children', mother char(12) NOT NULL COMMENT 'The mother of the listed children',
...@@ -15,8 +12,10 @@ INSERT INTO chlist VALUES('Claude','Marc'); ...@@ -15,8 +12,10 @@ INSERT INTO chlist VALUES('Claude','Marc');
INSERT INTO chlist VALUES('Janet','Arthur,Sandra,Peter,John'); INSERT INTO chlist VALUES('Janet','Arthur,Sandra,Peter,John');
SELECT * FROM chlist; SELECT * FROM chlist;
--replace_result $PORT PORT --echo #
--eval CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children,port=$PORT' --echo # Checking XCOL tables
--echo #
CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children';
SELECT * FROM child; SELECT * FROM child;
SELECT * FROM child ORDER BY mother; SELECT * FROM child ORDER BY mother;
SELECT * FROM child ORDER BY children; SELECT * FROM child ORDER BY children;
...@@ -24,5 +23,19 @@ SELECT mother FROM child; ...@@ -24,5 +23,19 @@ SELECT mother FROM child;
SELECT mother, COUNT(*) FROM child GROUP BY mother; SELECT mother, COUNT(*) FROM child GROUP BY mother;
SELECT mother, COUNT(children) FROM child GROUP BY mother; SELECT mother, COUNT(children) FROM child GROUP BY mother;
--echo #
--echo # Test using special columns
--echo #
CREATE TABLE `child2` (
`row` int NOT NULL SPECIAL=ROWID,
`num` int NOT NULL SPECIAL=ROWNUM,
`mother` varchar(12) NOT NULL COMMENT 'The mother of the children',
`child` varchar(12) NOT NULL COMMENT 'The child name' FLAG=2
) ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist `OPTION_LIST`='colname=child';
SELECT * FROM child2;
--echo # List only first child
SELECT mother, child FROM child2 where num = 1;
DROP TABLE child; DROP TABLE child;
DROP TABLE chlist; DROP TABLE chlist;
DROP TABLE child2;
This diff is collapsed.
...@@ -95,7 +95,7 @@ class DBX : public BLOCK { ...@@ -95,7 +95,7 @@ class DBX : public BLOCK {
const char *GetErrorMessage(int i); const char *GetErrorMessage(int i);
protected: protected:
void BuildErrorMessage(ODBConn* pdb, HSTMT hstmt = SQL_NULL_HSTMT); bool BuildErrorMessage(ODBConn* pdb, HSTMT hstmt = SQL_NULL_HSTMT);
// Attributes // Attributes
RETCODE m_RC; RETCODE m_RC;
...@@ -124,6 +124,7 @@ class ODBConn : public BLOCK { ...@@ -124,6 +124,7 @@ class ODBConn : public BLOCK {
forceOdbcDialog = 0x0010}; // Always display ODBC connect dialog forceOdbcDialog = 0x0010}; // Always display ODBC connect dialog
int Open(PSZ ConnectString, DWORD Options = 0); int Open(PSZ ConnectString, DWORD Options = 0);
bool Rewind(char *sql, ODBCCOL *tocols);
void Close(void); void Close(void);
// Attributes // Attributes
...@@ -190,4 +191,5 @@ class ODBConn : public BLOCK { ...@@ -190,4 +191,5 @@ class ODBConn : public BLOCK {
PSZ m_Connect; PSZ m_Connect;
bool m_Updatable; bool m_Updatable;
bool m_Transact; bool m_Transact;
bool m_Scrollable;
}; // end of ODBConn class definition }; // end of ODBConn class definition
...@@ -53,12 +53,12 @@ typedef int HANDLE; ...@@ -53,12 +53,12 @@ typedef int HANDLE;
#ifdef PATH_MAX #ifdef PATH_MAX
#define _MAX_PATH PATH_MAX #define _MAX_PATH PATH_MAX
#else #else
#define _MAX_PATH 260 #define _MAX_PATH FN_REFLEN
#endif #endif
#define _MAX_DRIVE 3 #define _MAX_DRIVE 3
#define _MAX_DIR 256 #define _MAX_DIR FN_REFLEN
#define _MAX_FNAME 256 #define _MAX_FNAME FN_HEADLEN
#define _MAX_EXT 256 #define _MAX_EXT FN_EXTLEN
#define INVALID_HANDLE_VALUE (-1) #define INVALID_HANDLE_VALUE (-1)
#define __stdcall #define __stdcall
#endif /* !WIN32 */ #endif /* !WIN32 */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include "xtable.h" #include "xtable.h"
#include "tabcol.h" #include "tabcol.h"
extern "C" int trace;
/***********************************************************************/ /***********************************************************************/
/* XTAB public constructor. */ /* XTAB public constructor. */
/***********************************************************************/ /***********************************************************************/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment