/ Check-in [59f72425]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Removed all C++ style comments. Ticket #3172. (CVS 5207)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 59f72425eb9acd270110a6a739f98a045c555f23
User & Date: shane 2008-06-12 02:16:45
Context
2008-06-12
02:24
Added x86_64 version of hwtime function. Ticket #3156. (CVS 5208) check-in: 0729f5c3 user: shane tags: trunk
02:16
Removed all C++ style comments. Ticket #3172. (CVS 5207) check-in: 59f72425 user: shane tags: trunk
00:07
Additional refinements to the new sqlite3_initialize() interface design. (CVS 5206) check-in: 14a9b945 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_os2.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to OS/2.
    14     14   **
    15         -** $Id: os_os2.c,v 1.40 2008/05/20 19:08:54 pweilbacher Exp $
           15  +** $Id: os_os2.c,v 1.41 2008/06/12 02:16:45 shane Exp $
    16     16   */
    17     17   
    18     18   #include "sqliteInt.h"
    19     19   
    20     20   #if OS_OS2
    21     21   
    22     22   /*
................................................................................
   651    651     ULONG ulAction;
   652    652     char *zNameCp;
   653    653   
   654    654     memset( pFile, 0, sizeof(*pFile) );
   655    655   
   656    656     OSTRACE2( "OPEN want %d\n", flags );
   657    657   
   658         -  //ulOpenMode = flags & SQLITE_OPEN_READWRITE ? OPEN_ACCESS_READWRITE : OPEN_ACCESS_READONLY;
          658  +  /*ulOpenMode = flags & SQLITE_OPEN_READWRITE ? OPEN_ACCESS_READWRITE : OPEN_ACCESS_READONLY;*/
   659    659     if( flags & SQLITE_OPEN_READWRITE ){
   660    660       ulOpenMode |= OPEN_ACCESS_READWRITE;
   661    661       OSTRACE1( "OPEN read/write\n" );
   662    662     }else{
   663    663       ulOpenMode |= OPEN_ACCESS_READONLY;
   664    664       OSTRACE1( "OPEN read only\n" );
   665    665     }
   666    666   
   667         -  //ulOpenFlags = flags & SQLITE_OPEN_CREATE ? OPEN_ACTION_CREATE_IF_NEW : OPEN_ACTION_FAIL_IF_NEW;
          667  +  /*ulOpenFlags = flags & SQLITE_OPEN_CREATE ? OPEN_ACTION_CREATE_IF_NEW : OPEN_ACTION_FAIL_IF_NEW;*/
   668    668     if( flags & SQLITE_OPEN_CREATE ){
   669    669       ulOpenFlags |= OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW;
   670    670       OSTRACE1( "OPEN open new/create\n" );
   671    671     }else{
   672    672       ulOpenFlags |= OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW;
   673    673       OSTRACE1( "OPEN open existing\n" );
   674    674     }
   675    675   
   676         -  //ulOpenMode |= flags & SQLITE_OPEN_MAIN_DB ? OPEN_SHARE_DENYNONE : OPEN_SHARE_DENYWRITE;
          676  +  /*ulOpenMode |= flags & SQLITE_OPEN_MAIN_DB ? OPEN_SHARE_DENYNONE : OPEN_SHARE_DENYWRITE;*/
   677    677     if( flags & SQLITE_OPEN_MAIN_DB ){
   678    678       ulOpenMode |= OPEN_SHARE_DENYNONE;
   679    679       OSTRACE1( "OPEN share read/write\n" );
   680    680     }else{
   681    681       ulOpenMode |= OPEN_SHARE_DENYWRITE;
   682    682       OSTRACE1( "OPEN share read only\n" );
   683    683     }
   684    684   
   685    685     if( flags & (SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_TEMP_JOURNAL
   686    686                  | SQLITE_OPEN_SUBJOURNAL) ){
   687    687       char pathUtf8[CCHMAXPATH];
   688         -    //ulFileAttribute = FILE_HIDDEN;  //for debugging, we want to make sure it is deleted
          688  +    /*ulFileAttribute = FILE_HIDDEN;  //for debugging, we want to make sure it is deleted*/
   689    689       ulFileAttribute = FILE_NORMAL;
   690    690       sqlite3OsFullPathname( pVfs, zName, CCHMAXPATH, pathUtf8 );
   691    691       pFile->pathToDel = convertUtf8PathToCp( pathUtf8 );
   692    692       OSTRACE1( "OPEN hidden/delete on close file attributes\n" );
   693    693     }else{
   694    694       ulFileAttribute = FILE_ARCHIVED | FILE_NORMAL;
   695    695       pFile->pathToDel = NULL;

Changes to src/util.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Utility functions used throughout sqlite.
    13     13   **
    14     14   ** This file contains functions for allocating memory, comparing
    15     15   ** strings, and stuff like that.
    16     16   **
    17         -** $Id: util.c,v 1.230 2008/05/19 15:54:59 drh Exp $
           17  +** $Id: util.c,v 1.231 2008/06/12 02:16:45 shane Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <stdarg.h>
    21     21   #include <ctype.h>
    22     22   
    23     23   
    24     24   /*
................................................................................
   557    557   ** Read a 64-bit variable-length integer from memory starting at p[0].
   558    558   ** Return the number of bytes read.  The value is stored in *v.
   559    559   */
   560    560   int sqlite3GetVarint(const unsigned char *p, u64 *v){
   561    561     u32 a,b,s;
   562    562   
   563    563     a = *p;
   564         -  // a: p0 (unmasked)
          564  +  /* a: p0 (unmasked) */
   565    565     if (!(a&0x80))
   566    566     {
   567    567       *v = a;
   568    568       return 1;
   569    569     }
   570    570   
   571    571     p++;
   572    572     b = *p;
   573         -  // b: p1 (unmasked)
          573  +  /* b: p1 (unmasked) */
   574    574     if (!(b&0x80))
   575    575     {
   576    576       a &= 0x7f;
   577    577       a = a<<7;
   578    578       a |= b;
   579    579       *v = a;
   580    580       return 2;
   581    581     }
   582    582   
   583    583     p++;
   584    584     a = a<<14;
   585    585     a |= *p;
   586         -  // a: p0<<14 | p2 (unmasked)
          586  +  /* a: p0<<14 | p2 (unmasked) */
   587    587     if (!(a&0x80))
   588    588     {
   589    589       a &= (0x7f<<14)|(0x7f);
   590    590       b &= 0x7f;
   591    591       b = b<<7;
   592    592       a |= b;
   593    593       *v = a;
   594    594       return 3;
   595    595     }
   596    596   
   597         -  // CSE1 from below
          597  +  /* CSE1 from below */
   598    598     a &= (0x7f<<14)|(0x7f);
   599    599     p++;
   600    600     b = b<<14;
   601    601     b |= *p;
   602         -  // b: p1<<14 | p3 (unmasked)
          602  +  /* b: p1<<14 | p3 (unmasked) */
   603    603     if (!(b&0x80))
   604    604     {
   605    605       b &= (0x7f<<14)|(0x7f);
   606         -    // moved CSE1 up
   607         -    // a &= (0x7f<<14)|(0x7f);
          606  +    /* moved CSE1 up */
          607  +    /* a &= (0x7f<<14)|(0x7f); */
   608    608       a = a<<7;
   609    609       a |= b;
   610    610       *v = a;
   611    611       return 4;
   612    612     }
   613    613   
   614         -  // a: p0<<14 | p2 (masked)
   615         -  // b: p1<<14 | p3 (unmasked)
   616         -  // 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked)
   617         -  // moved CSE1 up
   618         -  // a &= (0x7f<<14)|(0x7f);
          614  +  /* a: p0<<14 | p2 (masked) */
          615  +  /* b: p1<<14 | p3 (unmasked) */
          616  +  /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
          617  +  /* moved CSE1 up */
          618  +  /* a &= (0x7f<<14)|(0x7f); */
   619    619     b &= (0x7f<<14)|(0x7f);
   620    620     s = a;
   621         -  // s: p0<<14 | p2 (masked)
          621  +  /* s: p0<<14 | p2 (masked) */
   622    622   
   623    623     p++;
   624    624     a = a<<14;
   625    625     a |= *p;
   626         -  // a: p0<<28 | p2<<14 | p4 (unmasked)
          626  +  /* a: p0<<28 | p2<<14 | p4 (unmasked) */
   627    627     if (!(a&0x80))
   628    628     {
   629         -    // we can skip these cause they were (effectively) done above in calc'ing s
   630         -    // a &= (0x7f<<28)|(0x7f<<14)|(0x7f);
   631         -    // b &= (0x7f<<14)|(0x7f);
          629  +    /* we can skip these cause they were (effectively) done above in calc'ing s */
          630  +    /* a &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
          631  +    /* b &= (0x7f<<14)|(0x7f); */
   632    632       b = b<<7;
   633    633       a |= b;
   634    634       s = s>>18;
   635    635       *v = ((u64)s)<<32 | a;
   636    636       return 5;
   637    637     }
   638    638   
   639         -  // 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked)
          639  +  /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
   640    640     s = s<<7;
   641    641     s |= b;
   642         -  // s: p0<<21 | p1<<14 | p2<<7 | p3 (masked)
          642  +  /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
   643    643   
   644    644     p++;
   645    645     b = b<<14;
   646    646     b |= *p;
   647         -  // b: p1<<28 | p3<<14 | p5 (unmasked)
          647  +  /* b: p1<<28 | p3<<14 | p5 (unmasked) */
   648    648     if (!(b&0x80))
   649    649     {
   650         -    // we can skip this cause it was (effectively) done above in calc'ing s
   651         -    // b &= (0x7f<<28)|(0x7f<<14)|(0x7f);
          650  +    /* we can skip this cause it was (effectively) done above in calc'ing s */
          651  +    /* b &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
   652    652       a &= (0x7f<<14)|(0x7f);
   653    653       a = a<<7;
   654    654       a |= b;
   655    655       s = s>>18;
   656    656       *v = ((u64)s)<<32 | a;
   657    657       return 6;
   658    658     }
   659    659   
   660    660     p++;
   661    661     a = a<<14;
   662    662     a |= *p;
   663         -  // a: p2<<28 | p4<<14 | p6 (unmasked)
          663  +  /* a: p2<<28 | p4<<14 | p6 (unmasked) */
   664    664     if (!(a&0x80))
   665    665     {
   666    666       a &= (0x7f<<28)|(0x7f<<14)|(0x7f);
   667    667       b &= (0x7f<<14)|(0x7f);
   668    668       b = b<<7;
   669    669       a |= b;
   670    670       s = s>>11;
   671    671       *v = ((u64)s)<<32 | a;
   672    672       return 7;
   673    673     }
   674    674   
   675         -  // CSE2 from below
          675  +  /* CSE2 from below */
   676    676     a &= (0x7f<<14)|(0x7f);
   677    677     p++;
   678    678     b = b<<14;
   679    679     b |= *p;
   680         -  // b: p3<<28 | p5<<14 | p7 (unmasked)
          680  +  /* b: p3<<28 | p5<<14 | p7 (unmasked) */
   681    681     if (!(b&0x80))
   682    682     {
   683    683       b &= (0x7f<<28)|(0x7f<<14)|(0x7f);
   684         -    // moved CSE2 up
   685         -    // a &= (0x7f<<14)|(0x7f);
          684  +    /* moved CSE2 up */
          685  +    /* a &= (0x7f<<14)|(0x7f); */
   686    686       a = a<<7;
   687    687       a |= b;
   688    688       s = s>>4;
   689    689       *v = ((u64)s)<<32 | a;
   690    690       return 8;
   691    691     }
   692    692   
   693    693     p++;
   694    694     a = a<<15;
   695    695     a |= *p;
   696         -  // a: p4<<29 | p6<<15 | p8 (unmasked)
          696  +  /* a: p4<<29 | p6<<15 | p8 (unmasked) */
   697    697   
   698         -  // moved CSE2 up
   699         -  // a &= (0x7f<<29)|(0x7f<<15)|(0xff);
          698  +  /* moved CSE2 up */
          699  +  /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */
   700    700     b &= (0x7f<<14)|(0x7f);
   701    701     b = b<<8;
   702    702     a |= b;
   703    703   
   704    704     s = s<<4;
   705    705     b = p[-4];
   706    706     b &= 0x7f;
................................................................................
   719    719   ** single-byte case.  All code should use the MACRO version as 
   720    720   ** this function assumes the single-byte case has already been handled.
   721    721   */
   722    722   int sqlite3GetVarint32(const unsigned char *p, u32 *v){
   723    723     u32 a,b;
   724    724   
   725    725     a = *p;
   726         -  // a: p0 (unmasked)
          726  +  /* a: p0 (unmasked) */
   727    727   #ifndef getVarint32
   728    728     if (!(a&0x80))
   729    729     {
   730    730       *v = a;
   731    731       return 1;
   732    732     }
   733    733   #endif
   734    734   
   735    735     p++;
   736    736     b = *p;
   737         -  // b: p1 (unmasked)
          737  +  /* b: p1 (unmasked) */
   738    738     if (!(b&0x80))
   739    739     {
   740    740       a &= 0x7f;
   741    741       a = a<<7;
   742    742       *v = a | b;
   743    743       return 2;
   744    744     }
   745    745   
   746    746     p++;
   747    747     a = a<<14;
   748    748     a |= *p;
   749         -  // a: p0<<14 | p2 (unmasked)
          749  +  /* a: p0<<14 | p2 (unmasked) */
   750    750     if (!(a&0x80))
   751    751     {
   752    752       a &= (0x7f<<14)|(0x7f);
   753    753       b &= 0x7f;
   754    754       b = b<<7;
   755    755       *v = a | b;
   756    756       return 3;
   757    757     }
   758    758   
   759    759     p++;
   760    760     b = b<<14;
   761    761     b |= *p;
   762         -  // b: p1<<14 | p3 (unmasked)
          762  +  /* b: p1<<14 | p3 (unmasked) */
   763    763     if (!(b&0x80))
   764    764     {
   765    765       b &= (0x7f<<14)|(0x7f);
   766    766       a &= (0x7f<<14)|(0x7f);
   767    767       a = a<<7;
   768    768       *v = a | b;
   769    769       return 4;
   770    770     }
   771    771   
   772    772     p++;
   773    773     a = a<<14;
   774    774     a |= *p;
   775         -  // a: p0<<28 | p2<<14 | p4 (unmasked)
          775  +  /* a: p0<<28 | p2<<14 | p4 (unmasked) */
   776    776     if (!(a&0x80))
   777    777     {
   778    778       a &= (0x7f<<28)|(0x7f<<14)|(0x7f);
   779    779       b &= (0x7f<<28)|(0x7f<<14)|(0x7f);
   780    780       b = b<<7;
   781    781       *v = a | b;
   782    782       return 5;