ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
FILEINFO Utility for .IDX and .DAT files (Sdk)
FILEINFO Utility for .IDX and .DAT files // Sdkjim flemingFeb 8, 1999, 3:34pm
http://www.faircom.com/download/fc_download.html
at at at http://www.faircom.com "The secret of our portability is in releasing full C source code. With c-tree Plus, your C programmers need only to develop applications once, and port the same source code to virtually any environment with no source code changes." at at at at at at at at at at at at at at at at at at at at at at at at .. <DIR> 01-01-98 12:39a . ... <DIR> 01-01-98 12:39a .. ART <DIR> 01-01-98 12:39a art WORLD DAT 13,312 02-08-99 11:13a world.dat WORLD IDX 4,096 02-08-99 11:13a world.idx PROPERTY <DIR> 01-01-98 12:39a property FILEINFO EXE 162,180 02-08-99 11:09a fileinfo.exe 3 file(s) 179,588 bytes 4 dir(s) 6,799.52 MB free C:\Active Worlds\cache>fileinfo world.idx c-tree Plus IFIL and DODA Extraction Utility. world.idx is an index file. Index node size - 512 Logical file size - 4096 Physical file size - 4096 File mode - 64 - ctFIXED WRITETHRU Index files have no DODA or IFIL structures. at at at at at at at at at at at at at at at at at at at at at C:\Active Worlds\cache>fileinfo world.dat c-tree Plus IFIL and DODA Extraction Utility. world.dat is a variable-length data file. Logical file size - 12525 Physical file size - 13312 File mode - 68 - VLENGTH WRITETHRU Error getting IFIL, error = 401. The FairCom ODBC Driver(TM) can not be used without the IFIL structure. Error getting DODA, error = 401. The FairCom ODBC Driver(TM) can not be used without the DODA structure. at at at at at at at at at at at at at at at at at at at at at at at at at at at at ftp://ftp.faircom.com/pub/fileinfo.c /*************************************************************************** **/ /* */ /* Public domain Incremental ISAM utility */ /* */ /* Retrieves IFIL and DODA structures from a c-tree file. */ /* */ /* arguments: */ /* fileinfo FileName */ /*************************************************************************** **/ #include "ctstdr.h" #include "ctoptn.h" #include "ctaerr.h" #include "cterrc.h" #include "ctdecl.h" #include <stdlib.h> /* ************************************************************************* */ pIFIL work_pIFIL; pDATOBJ work_pDATOBJ; pConvMap work_pConvMap; #ifdef PROTOTYPE main (NINT argc,pTEXT argv[]) #else main (argc,argv) NINT argc; pTEXT argv[]; #endif { TEXT *fil = NULL; TEXT *uid = NULL; TEXT *upw = NULL; TEXT *svn = NULL; LONG info; VRLEN res_len, buf_size; COUNT i,j; COUNT mode; #ifdef THINK_C argc = ccommand(&argv); #endif #ifdef CTTOOL setvbuf(stdout,NULL,_IOLBF,0); #endif if (argc > 1) fil = *++argv; else { printf("\nFILEINFO has one required and three optional command line arguments:"); printf("\nfileinfo FileName <UserId> <UserPassword> <ServerName>"); ctrt_exit(1); } if (argc > 2) uid = *++argv; if (argc > 3) upw = *++argv; if (argc > 4) svn = *++argv; printf("\nc-tree PLUS(TM) V6.6\n\nIFIL and DODA extraction Utility\n\n"); if (INTISAMX(3, /* 3 index buffers */ 10, /* 10 files */ 16, /* page sectors => 2048 bytes cache page size */ 3, /* 3 data buffers */ 0, /* UserProfile: perform automatic TFRMKEYs */ uid, /* pointer to user id */ upw, /* pointer to user password */ svn)) /* pointer to server name */ { printf("\nCould not initialize c-tree Plus(%d)\n",isam_err); ctrt_exit(2); } /*************************************************************************** **/ /* Open file at low level, retrieve IFIL structure and DODA */ /*************************************************************************** **/ mode = READFIL | OPENCRPT; /* READFIL allows us to open TRANPROC files */ OPNFIL(0,fil,mode); if (uerr_cod == KSIZ_ERR) /* node size too small - try larger */ { printf("\nCould not open %s with Error %d - errno %d.\n",fil,uerr_cod,sysiocod); printf("Attempting to reinitialize with larger sect setting\n\n"); CLISAM(); if (INTISAMX(4, /* 4 index buffers */ 2, /* 2 files */ 128, /* page sectors => 16384 - shoot high */ 4, /* 4 data file buffers */ 0, /* UserProfile: perform automatic TFRMKEYs */ uid, /* pointer to user id */ upw, /* pointer to user password */ svn)) /* pointer to server name */ { printf("\nCould not reinitialize c-tree Plus(%d)\n",isam_err); CLISAM(); ctrt_exit(2); } OPNFIL(0,fil,mode); } if (uerr_cod) { printf("\nCould not open %s with Error %d - errno %d.\n",fil,uerr_cod,sysiocod); CLISAM(); ctrt_exit(3); } info = GETFIL(0,FILTYP); switch (info) { case 0: printf("%s is a fixed-length data file\n\n",fil); break; case 1: printf("%s is an index file\n\n",fil); break; case 2: printf("%s is a variable-length data file\n\n",fil); break; } if (info == 1) { info = GETFIL(0,NODSIZ); if (info) printf("Index node size - %ld\n",info); } else { info = GETFIL(0,RECLEN); if (info) printf("Data record length - %ld\n",info); } info = GETFIL(0,LOGSIZ); if (info) printf("Logical file size - %ld\n",info); info = GETFIL(0,PHYSIZ); if (info) printf("Physical file size - %ld\n",info); info = GETFIL(0,FILMOD); info -= mode; printf("File mode - %d - ",info); if (!info) printf("ctFIXED "); /* 0 */ if (info & VLENGTH) printf("VLENGTH "); /* 4 */ if (info & TRNLOG) printf("TRANLOG "); /* 48 */ else if (info & PREIMG) printf("PREIMG "); /* 16 */ if (info & WRITETHRU) printf("WRITETHRU "); /* 64 */ if (info & CHECKLOCK) printf("CHECKLOCK "); /* 128 */ if (info & SUPERFILE) printf("SUPERFILE "); /* 512 */ if (info & CHECKREAD) printf("CHECKREAD "); /* 1024 */ if (info & DISABLERES) printf("DISABLERES "); /* 2048 */ printf("\n\n"); res_len = GETIFIL(0,0,NULL); if (!res_len) /* IFIL not found */ { printf("Error getting IFIL, error = %d\n",isam_err); if (isam_err == RNOT_ERR) printf("IFIL information not stored for this file\n\n"); } else /* IFIL found */ { work_pIFIL = (pIFIL)malloc(res_len); if(!work_pIFIL) printf("Error allocating space for IFIL\n"); CLISAM(); exit(1); } buf_size = res_len; res_len = GETIFIL(0, buf_size, work_pIFIL); if (!res_len) /* IFIL not found */ { printf("Error getting IFIL, error = %d\n",isam_err); if (isam_err == RNOT_ERR) printf("IFIL information not stored for this file\n\n"); } /* Print IFIL, IIDX, ISEG */ printf("IFIL {\n"); printf("\t/* data file name */ %s,\n",work_pIFIL->pfilnam); printf("\t/* data file number */ %d,\n",work_pIFIL->dfilno); printf("\t/* data record length */ %u,\n",work_pIFIL->dreclen); printf("\t/* data extension size */ %u,\n",work_pIFIL->dxtdsiz); printf("\t/* data file mode */ %d,\n",work_pIFIL->dfilmod); printf("\t/* number of indices */ %d,\n",work_pIFIL->dnumidx); printf("\t/* index extension size */ %u,\n",work_pIFIL->ixtdsiz); printf("\t/* index file mode */ %d,\n",work_pIFIL->ifilmod); printf("\t/* index pointer */ %p,\n",work_pIFIL->ix); if (work_pIFIL->rfstfld) printf("\t/* first r-tree field */ %s,\n",work_pIFIL->rfstfld); else printf("\t/* first r-tree field */ %p,\n",work_pIFIL->rfstfld); if (work_pIFIL->rlstfld) printf("\t/* last r-tree field */ %s,\n",work_pIFIL->rlstfld); else printf("\t/* last r-tree field */ %p,\n",work_pIFIL->rlstfld); printf("\t/* temporary file number*/ %d \n",work_pIFIL->tfilno); printf("};\n"); getchar(); for(i=0; i<work_pIFIL->dnumidx; i++) { printf("IIDX #%d {\n",i); printf("\t/* key length */ %d,\n",((work_pIFIL->ix)+i)->ikeylen); printf("\t/* key type */ %d,\n",((work_pIFIL->ix)+i)->ikeytyp); printf("\t/* duplicate flag */ %d,\n",((work_pIFIL->ix)+i)->ikeydup); printf("\t/* null key flag */ %d,\n",((work_pIFIL->ix)+i)->inulkey); printf("\t/* empty character */ %d,\n",((work_pIFIL->ix)+i)->iempchr); printf("\t/* number of segments */ %d,\n",((work_pIFIL->ix)+i)->inumseg); printf("\t/* segment pointer */ %p,\n",(((work_pIFIL->ix)+i)->seg)); if (((work_pIFIL->ix)+i)->ridxnam) printf("\t/* r-tree symbolic index */ %s,\n",((work_pIFIL->ix)+i)->ridxnam); else printf("\t/* r-tree symbolic index */ %p,\n",((work_pIFIL->ix)+i)->ridxnam); if (((work_pIFIL->ix)+i)->aidxnam) printf("\t/* alternate index name */ %s,\n",((work_pIFIL->ix)+i)->aidxnam); else printf("\t/* alternate index name */ %p,\n",((work_pIFIL->ix)+i)->aidxnam); printf("\t/* alternate collating seq */ %p,\n",(((work_pIFIL->ix)+i)->altseq)); printf("\t/* alternate pad byte */ %p,\n",(((work_pIFIL->ix)+i)->pvbyte)); printf("};\n\n"); printf("ISEG [] {\n"); for(j=0; j<((work_pIFIL->ix)+i)->inumseg; j++) { printf("\t{%d, %d, %d},\n",((((work_pIFIL->ix)+i)->seg)+j)->soffset, ((((work_pIFIL->ix)+i)->seg)+j)->slength, ((((work_pIFIL->ix)+i)->seg)+j)->segmode); } printf("\t};\n\n"); printf("\nPRESS ANY KEY TO CONTINUE\n"); getchar(); } } /* End IFIL found */ work_pConvMap = (pConvMap) work_pIFIL; res_len = GETDODA(0, buf_size, work_pConvMap, SCHEMA_MAP); if(!res_len) printf("Error getting DODA, error = %d\n", uerr_cod); if ((uerr_cod == DZRO_ERR) || (uerr_cod == RNOT_ERR)) printf("DODA information not stored for this file\n"); CLISAM(); free(work_pConvMap); exit(1); } if(res_len > buf_size) /* Too large for buffer */ free(work_pConvMap); work_pConvMap = (pConvMap)malloc(res_len); if(!work_pConvMap) printf("Error allocating space for DODA\n"); CLISAM(); exit(1); } buf_size = res_len; res_len = GETDODA(0, buf_size, work_pConvMap, SCHEMA_MAP); if(!res_len) printf("Error getting DODA, error = %d\n", uerr_cod); CLISAM(); free(work_pDATOBJ); exit(1); } } printf("SCHEMA MAP HEADER:"); printf("\nflavor: %d",work_pConvMap->flavor); printf("\nalign: %d",work_pConvMap->align); if (work_pConvMap->flddelm == '\0') printf("\ndelimiter: \'\\0\' (0 decimal)",work_pConvMap->flddelm); else printf("\ndelimiter: \'%c\' (%d decimal)",work_pConvMap->flddelm,work_pConvMap->flddelm); printf("\npadding: \'%c\' (%d decimal)",work_pConvMap->padding,work_pConvMap->padding); printf("\nmap length: %d",work_pConvMap->maplen); printf("\nnbr fields: %d",work_pConvMap->nbrflds); printf("\nnbr blocks: %d\n\n",work_pConvMap->nbrblks); printf("\nPRESS ANY KEY TO CONTINUE\n"); getchar(); work_pDATOBJ = (pDATOBJ) work_pConvMap; res_len = GETDODA(0,buf_size, work_pDATOBJ, SCHEMA_DODA); if(!res_len) printf("Error getting DODA, error = %d\n", uerr_cod); if ((uerr_cod == DZRO_ERR) || (uerr_cod == RNOT_ERR)) printf("DODA information not stored for this file\n"); CLISAM(); free(work_pDATOBJ); exit(1); } if(res_len > buf_size) /* Too large for buffer */ free(work_pDATOBJ); work_pDATOBJ = (pDATOBJ)malloc(res_len); if(!work_pDATOBJ) printf("Error allocating space for DODA\n"); CLISAM(); exit(1); } buf_size = res_len; res_len = GETDODA(0, buf_size, work_pDATOBJ, SCHEMA_DODA); if(!res_len) printf("Error getting DODA, error = %d\n", uerr_cod); CLISAM(); free(work_pDATOBJ); exit(1); } } printf("\nDODA:\n"); for(i=0;work_pDATOBJ[i].flen > 0;++i) { ctrt_printf("field = %-10s ",work_pDATOBJ[i].fsymb); ctrt_printf("offset = %4ld ",work_pDATOBJ[i].fadr); ctrt_printf("field type = %4d ",work_pDATOBJ[i].ftype); ctrt_printf("length = %4d\n",work_pDATOBJ[i].flen); if (!((i+1) % 20)) { printf("\nPRESS ANY KEY TO CONTINUE\n"); getchar(); } } CLISAM(); free(work_pDATOBJ); return(0); } at at at at at at at at at at at at at at at at at at at at at Jim Fleming UNIR, COM and UNETY worlds in AW =?iso-8859-1?q?eep=b2?=Feb 8, 1999, 9:13pm
You wouldn't be trying to crack the world .dat files for their models now would you, Jim?
[View Quote] > http://www.faircom.com/download/fc_download.html > > at at at http://www.faircom.com > > "The secret of our portability is in releasing full C source > code. With c-tree Plus, your C programmers need only to > develop applications once, and port the same source code > to virtually any environment with no source code changes." > > at at at at at at at at at at at at at at at at at at at at at at at at > > . <DIR> 01-01-98 12:39a . > .. <DIR> 01-01-98 12:39a .. > ART <DIR> 01-01-98 12:39a art > WORLD DAT 13,312 02-08-99 11:13a world.dat > WORLD IDX 4,096 02-08-99 11:13a world.idx > PROPERTY <DIR> 01-01-98 12:39a property > FILEINFO EXE 162,180 02-08-99 11:09a fileinfo.exe > 3 file(s) 179,588 bytes > 4 dir(s) 6,799.52 MB free > > C:\Active Worlds\cache>fileinfo world.idx > > c-tree Plus IFIL and DODA Extraction Utility. > > world.idx is an index file. > > Index node size - 512 > Logical file size - 4096 > Physical file size - 4096 > File mode - 64 - ctFIXED WRITETHRU > > Index files have no DODA or IFIL structures. > > at at at at at at at at at at at at at at at at at at at at at > > C:\Active Worlds\cache>fileinfo world.dat > > c-tree Plus IFIL and DODA Extraction Utility. > > world.dat is a variable-length data file. > > Logical file size - 12525 > Physical file size - 13312 > File mode - 68 - VLENGTH WRITETHRU > > Error getting IFIL, error = 401. > The FairCom ODBC Driver(TM) can not be used without the IFIL structure. > > Error getting DODA, error = 401. > The FairCom ODBC Driver(TM) can not be used without the DODA structure. jim flemingFeb 8, 1999, 9:58pm
I guess I am confused. Who is they (or their) ????
In many of your postings you seem to take an "us and them" position. Who is "them" ? Have you ever considered that "we" are it ? Jim Fleming Unir Corporation [View Quote] =?iso-8859-1?q?eep=b2?=Feb 8, 1999, 11:09pm
For the WORLDS' models, zippy. Fail english grammar class?
[View Quote] > I guess I am confused. Who is they (or their) ???? > > In many of your postings you seem to take an "us and them" position. Who is "them" ? > > Have you ever considered that "we" are it ? > [View Quote] |