Changeset 6287 for branches/stable_5.0

Show
Ignore:
Timestamp:
01/12/09 11:10:13 (2 years ago)
Author:
westram
Message:
Location:
branches/stable_5.0
Files:
12 modified

Legend:

Unmodified
Added
Removed
  • branches/stable_5.0/AWT/AWT_db_browser.cxx

    r6075 r6287  
    482482 
    483483inline void insert_history_selection(AW_window *aww, AW_selection_list *sel, const char *entry, int wanted_db) { 
    484     char *colon = strchr(entry, ':'); 
     484    const char *colon = strchr(entry, ':'); 
    485485    if (colon && (atoi(entry) == wanted_db)) { 
    486486        aww->insert_selection(sel, colon+1, colon+1); 
  • branches/stable_5.0/AWT/AWT_file_selection.cxx

    r6096 r6287  
    143143 
    144144char *AWT_extract_directory(const char *path) { 
    145     char *lslash = strrchr(path, '/'); 
     145    const char *lslash = strrchr(path, '/'); 
    146146    if (!lslash) return 0; 
    147147 
  • branches/stable_5.0/AWTI/AWTI_import.cxx

    r6101 r6287  
    2020 
    2121inline const char *name_only(const char *fullpath) { 
    22     char *lslash = strrchr(fullpath, '/'); 
     22    const char *lslash = strrchr(fullpath, '/'); 
    2323    return lslash ? lslash+1 : fullpath; 
    2424} 
  • branches/stable_5.0/HELP_SOURCE/arb_help2xml.cxx

    r6142 r6287  
    303303    // otherwise returns position behind keyword and sets value of 'keyword' 
    304304 
    305     char *space = strchr(line, ' '); 
     305    const char *space = strchr(line, ' '); 
    306306    if (space && space>line) { 
    307307        keyword = string(line, 0, space-line); 
  • branches/stable_5.0/Makefile

    r6185 r6287  
    5959        4.2.0 4.2.1 4.2.3 4.2.4 \ 
    6060        4.3 4.3.1 4.3.2 4.3.3 \ 
     61        4.4.1 
    6162 
    6263ALLOWED_GCC_VERSIONS=$(ALLOWED_GCC_3xx_VERSIONS) $(ALLOWED_GCC_4xx_VERSIONS) 
  • branches/stable_5.0/NTREE/NT_edconf.cxx

    r5942 r6287  
    250250    struct SAI_string_builder *sai_builder = (struct SAI_string_builder*)cd_sai_builder; 
    251251 
    252     char *sep = strchr(key,1); 
     252    const char *sep = strchr(key,1); 
    253253    if (!sep) return val;                           // what's wrong 
    254254 
  • branches/stable_5.0/PROBE_DESIGN/SaiProbeVisualization.cxx

    r5990 r6287  
    527527                    if (!tok_suffix) { 
    528528                        // handle special case where no suffix exists 
    529                         char *end = strchr(probeRegion, 0); 
     529                        const char *end = strchr(probeRegion, 0); 
    530530                        if (end>probeRegion && end[-1] == '-') tok_suffix = ""; 
    531531                    } 
  • branches/stable_5.0/PROBE_DESIGN/probe_design.cxx

    r6143 r6287  
    18491849 
    18501850        if (!error) { // set pt-server database file to same permissions as pts directory 
    1851             char *dir = strrchr(file,'/'); 
     1851            char *dir = const_cast<char*>(strrchr(file,'/')); 
    18521852            if (dir) { 
    18531853                *dir = 0; 
  • branches/stable_5.0/READSEQ/ureadseq.c

    r5155 r6287  
    7070 
    7171#ifndef Local 
    72 # define Local      static    /* local functions */ 
     72# define Local static /* local functions */ 
    7373#endif 
    7474 
     
    144144} 
    145145 
    146 Local void getline(struct ReadSeqVars *V) 
     146Local void GetLine(struct ReadSeqVars *V) 
    147147{ 
    148148  readline(V->f, V->s, &V->linestart); 
    149149} 
    150150 
    151 Local void ungetline(struct ReadSeqVars *V) 
     151Local void unGetLine(struct ReadSeqVars *V) 
    152152{ 
    153153  fseek(V->f, V->linestart, 0); 
     
    227227  if (addfirst) addseq(V->s, V); 
    228228  do { 
    229     getline(V); 
     229    GetLine(V); 
    230230    V->done = feof(V->f); 
    231231    V->done |= (*endTest)( &addend, &ungetend, V); 
     
    238238  else { 
    239239    V->allDone = (V->nseq >= V->choice); 
    240     if (V->allDone && ungetend) ungetline(V); 
     240    if (V->allDone && ungetend) unGetLine(V); 
    241241    } 
    242242} 
     
    258258  while (!V->allDone) { 
    259259    do { 
    260       getline(V); 
     260      GetLine(V); 
    261261      for (si= V->s; *si != 0 && *si < ' '; si++) *si= ' '; /* drop controls */ 
    262262      if (*si == 0) *V->s= 0; /* chop line to empty */ 
     
    284284 
    285285  while (!V->allDone) { 
    286     getline(V); 
     286    GetLine(V); 
    287287    if (strstr(V->s,"; DNA sequence  ") == V->s) 
    288288      strcpy(V->seqid, (V->s)+16); 
     
    290290      strcpy(V->seqid, (V->s)+1); 
    291291    while ((!feof(V->f)) && (*V->s == ';')) { 
    292       getline(V); 
     292      GetLine(V); 
    293293      } 
    294294    if (feof(V->f)) V->allDone = true; 
     
    310310  while (!V->allDone) { 
    311311    while (! (feof(V->f) || strstr(V->s,"ENTRY")  || strstr(V->s,"SEQUENCE")) ) 
    312       getline(V); 
     312      GetLine(V); 
    313313    strcpy(V->seqid, (V->s)+16); 
    314314    while (! (feof(V->f) || strstr(V->s,"SEQUENCE") == V->s)) 
    315       getline(V); 
     315      GetLine(V); 
    316316    readLoop(0, false, endPIR, V); 
    317317 
     
    319319     while (! (feof(V->f) || ((*V->s != 0) 
    320320       && (strstr( V->s,"ENTRY") == V->s)))) 
    321         getline(V); 
     321        GetLine(V); 
    322322      } 
    323323    if (feof(V->f)) V->allDone = true; 
     
    342342    strcpy(V->seqid, (V->s)+12); 
    343343    while (! (feof(V->f) || strstr(V->s,"ORIGIN") == V->s)) 
    344       getline(V); 
     344      GetLine(V); 
    345345    readLoop(0, false, endGB, V); 
    346346 
     
    348348     while (! (feof(V->f) || ((*V->s != 0) 
    349349       && (strstr( V->s, "LOCUS") == V->s)))) 
    350         getline(V); 
     350        GetLine(V); 
    351351      } 
    352352    if (feof(V->f)) V->allDone = true; 
     
    382382  while (!V->allDone) { 
    383383    strcpy(V->seqid, (V->s)+4); 
    384     getline(V);   /*skip title-junk line*/ 
     384    GetLine(V);   /*skip title-junk line*/ 
    385385    readLoop(0, false, endNBRF, V); 
    386386    if (!V->allDone) { 
    387387     while (!(feof(V->f) || (*V->s != 0 && *V->s == '>'))) 
    388         getline(V); 
     388        GetLine(V); 
    389389      } 
    390390    if (feof(V->f)) V->allDone = true; 
     
    408408    if (!V->allDone) { 
    409409     while (!(feof(V->f) || ((*V->s != 0) && (*V->s == '>')))) 
    410         getline(V); 
     410        GetLine(V); 
    411411      } 
    412412    if (feof(V->f)) V->allDone = true; 
     
    428428    strcpy(V->seqid, (V->s)+5); 
    429429    do { 
    430       getline(V); 
     430      GetLine(V); 
    431431    } while (!(feof(V->f) | (strstr(V->s,"SQ   ") == V->s))); 
    432432 
     
    435435      while (!(feof(V->f) | 
    436436         ((*V->s != '\0') & (strstr(V->s,"ID   ") == V->s)))) 
    437       getline(V); 
     437      GetLine(V); 
    438438    } 
    439439    if (feof(V->f)) V->allDone = true; 
     
    455455 
    456456  while (!V->allDone) { 
    457     getline(V);  /*s == "seqLen seqid string..."*/ 
     457    GetLine(V);  /*s == "seqLen seqid string..."*/ 
    458458    strcpy(V->seqid, (V->s)+6); 
    459459    readLoop(0, false, endZuker, V); 
     
    461461      while (!(feof(V->f) | 
    462462        ((*V->s != '\0') & (*V->s == '(')))) 
    463           getline(V); 
     463          GetLine(V); 
    464464      } 
    465465    if (feof(V->f)) V->allDone = true; 
     
    504504    addseq(V->s, V); 
    505505    V->done = feof(V->f); 
    506     getline(V); 
     506    GetLine(V); 
    507507  } while (!V->done); 
    508508  if (V->choice == kListSequences) addinfo(V->seqid, V); 
     
    51651610nov91: Reading GCG files casued duplication of last line when 
    517517         EOF followed that line !!! 
    518     fix: getline now sets *V->s = 0 
     518    fix: GetLine now sets *V->s = 0 
    519519*/ 
    520520  char  *si; 
     
    530530  do { 
    531531    V->done = feof(V->f); 
    532     getline(V); 
     532    GetLine(V); 
    533533    if (!V->done) addseq((V->s), V); 
    534534  } while (!V->done); 
     
    549549  rewind(V->f); V->nseq= 0; 
    550550  do { 
    551     getline(V); 
     551    GetLine(V); 
    552552    V->done = feof(V->f); 
    553553 
     
    632632  rewind(V->f); V->nseq= 0; 
    633633  do { 
    634     getline(V); 
     634    GetLine(V); 
    635635    V->done = feof(V->f); 
    636636 
     
    703703 
    704704  do { 
    705     getline(V); 
     705    GetLine(V); 
    706706    V->done = feof(V->f); 
    707707 
     
    784784  indata= true; /* call here after we find "matrix" */ 
    785785  do { 
    786     getline(V); 
     786    GetLine(V); 
    787787    V->done = feof(V->f); 
    788788 
     
    869869 
    870870  do { 
    871     getline(V); 
     871    GetLine(V); 
    872872    V->done = feof(V->f); 
    873873 
     
    922922  skipwhitespace(si); 
    923923  V->topseqlen= atol(si); 
    924   getline(V); 
     924  GetLine(V); 
    925925  while (!V->allDone) { 
    926926    V->seqlencount= 0; 
     
    953953  else { 
    954954 
    955     for (l = skiplines_; l > 0; l--) getline( V); 
     955    for (l = skiplines_; l > 0; l--) GetLine( V); 
    956956 
    957957    do { 
    958       getline( V); 
     958      GetLine( V); 
    959959      for (l= strlen(V->s); (l > 0) && (V->s[l] == ' '); l--) ; 
    960960    } while ((l == 0) && !feof(V->f)); 
     
    981981        /* rewind(V->f); V->nseq= 0; ?? assume it is at top ?? skiplines ... */ 
    982982        while (!done) { 
    983           getline( V); 
     983          GetLine( V); 
    984984          tolowerstr( V->s); 
    985985          if (strstr( V->s, "matrix")) done= true; 
     
    10131013 
    10141014      case kFitch : 
    1015         strcpy(V->seqid, V->s); getline(V); 
     1015        strcpy(V->seqid, V->s); GetLine(V); 
    10161016        readFitch(V); 
    10171017        break; 
     
    10211021          gotuw = (strstr(V->s,"..") != NULL); 
    10221022          if (gotuw) readUWGCG(V); 
    1023           getline(V); 
     1023          GetLine(V); 
    10241024        } while (!(feof(V->f) || V->allDone)); 
    10251025        break; 
  • branches/stable_5.0/SL/FAST_ALIGNER/ClustalV.cxx

    r5904 r6287  
    287287//          -1 if one char is illegal 
    288288{ 
    289     char *p1 = strchr(nucleic_acid_order, c1); 
    290     char *p2 = strchr(nucleic_acid_order, c2); 
     289    const char *p1 = strchr(nucleic_acid_order, c1); 
     290    const char *p2 = strchr(nucleic_acid_order, c2); 
    291291 
    292292    awtc_assert(c1); 
  • branches/stable_5.0/SL/FILE_BUFFER/FileBuffer.cxx

    r5958 r6287  
    1313#include <cstdlib> 
    1414#include <cstring> 
     15#include <cstdio> 
    1516#include <errno.h> 
    1617 
  • branches/stable_5.0/TOOLS/arb_gene_probe.cxx

    r5894 r6287  
    216216 
    217217#if defined(DEBUG) 
    218     char *firstSem = strchr(long_name, ';'); 
     218    const char *firstSem = strchr(long_name, ';'); 
    219219    gp_assert(firstSem); 
    220220    CHECK_SEMI_ESCAPED(firstSem+1);