Changeset 6852


Ignore:
Timestamp:
10/20/16 17:01:59 (3 years ago)
Author:
kevin
Message:

Modifed to fix format errors

Location:
trunk/src
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/archiving/cont_trig/statrpt.c

    r4081 r6852  
    7474    if ( contNet->contEwh.typeHeartbeat == type ) 
    7575    { 
    76        sprintf( outMsg, "%ld %ld\n\0", (long) msgTime, (long) contNet->MyPid ); 
     76       sprintf( outMsg, "%ld %ld\n", (long) msgTime, (long) contNet->MyPid ); 
    7777  
    7878      /*Write the message to the output region                          */ 
     
    9292    { 
    9393       if ( message ) { 
    94          sprintf( outMsg, "%ld %hd %s\n\0", (long) msgTime, code, message ); 
     94         sprintf( outMsg, "%ld %hd %s\n", (long) msgTime, code, message ); 
    9595         logit("t","Error:%d (%s)\n", code, message ); 
    9696       } 
    9797       else { 
    98          sprintf( outMsg, "%ld %hd\n\0", (long) msgTime, code ); 
     98         sprintf( outMsg, "%ld %hd\n", (long) msgTime, code ); 
    9999         logit("t","Error:%d (No description)\n", code ); 
    100100       } 
  • trunk/src/archiving/menlo_report/menlo_report.c

    r6803 r6852  
    869869   if( type == TypeHeartBeat ) 
    870870   { 
    871         sprintf( msg, "%ld %ld\n\0", (long) t, (long) MyPid); 
     871        sprintf( msg, "%ld %ld\n", (long) t, (long) MyPid); 
    872872   } 
    873873   else if( type == TypeError ) 
    874874   { 
    875         sprintf( msg, "%ld %hd %s\n\0", (long) t, ierr, note); 
     875        sprintf( msg, "%ld %hd %s\n", (long) t, ierr, note); 
    876876        logit( "et", "menlo_report: %s\n", note ); 
    877877   } 
  • trunk/src/data_exchange/ew2file/ew2file.c

    r6803 r6852  
    460460            time(&now); 
    461461            sprintf( errText, "%ld %hd msg[%ld] i%d m%d t%d too long for target", 
    462                      (long)now, ERR_TOOBIG, recsize, (int) reclogo.instid, 
     462                     (long)now, (short)ERR_TOOBIG, recsize, (int) reclogo.instid, 
    463463                     (int) reclogo.mod, (int)reclogo.type ); 
    464464            ew2file_status( &ErrorLogo, errText ); 
     
    468468            time(&now); 
    469469            sprintf( errText, "%ld %hd missed msg(s) i%d m%d t%d in %s", 
    470                      (long)now, ERR_MISSMSG, (int) reclogo.instid, 
     470                     (long)now, (short)ERR_MISSMSG, (int) reclogo.instid, 
    471471                     (int) reclogo.mod, (int)reclogo.type, InRing ); 
    472472            ew2file_status( &ErrorLogo, errText ); 
     
    475475            time(&now); 
    476476            sprintf( errText, "%ld %hd no tracking for logo i%d m%d t%d in %s", 
    477                      (long)now, ERR_NOTRACK, (int) reclogo.instid, 
     477                     (long)now, (short)ERR_NOTRACK, (int) reclogo.instid, 
    478478                     (int) reclogo.mod, (int)reclogo.type, InRing ); 
    479479            ew2file_status( &ErrorLogo, errText ); 
     
    497497            /* Currently, eneueue() in mem_circ_queue.c never returns this error. */ 
    498498            time(&now); 
    499             sprintf(errText,"%ld %hd internal queue error. Terminating.", (long)now, ERR_QUEUE); 
     499            sprintf(errText,"%ld %hd internal queue error. Terminating.", (long)now, (short)ERR_QUEUE); 
    500500            ew2file_status( &ErrorLogo, errText ); 
    501501            goto error; 
     
    504504            time(&now); 
    505505            sprintf(errText,"%ld %hd message too big for queue.", (long)now, 
    506                     ERR_QUEUE); 
     506                    (short)ERR_QUEUE); 
    507507            ew2file_status( &ErrorLogo, errText ); 
    508508            continue; 
     
    957957    if ( (fp = fopen(outFile, "ab")) == NULL) { 
    958958        time(&now); 
    959         sprintf(errText, "%ld %hd error creating file %s: %s", (long)now, ERR_WRITE, 
     959        sprintf(errText, "%ld %hd error creating file %s: %s", (long)now, (short)ERR_WRITE, 
    960960                outFile, strerror(errno)); 
    961961        return( -1 ); 
     
    964964    if ( ret != 1) { 
    965965        time(&now); 
    966         sprintf(errText, "%ld %hd error writing file %s: %s", (long)now, ERR_WRITE, 
     966        sprintf(errText, "%ld %hd error writing file %s: %s", (long)now, (short)ERR_WRITE, 
    967967                outFile, strerror(errno)); 
    968968        fclose(fp); 
     
    971971    if (fclose(fp) != 0) { 
    972972        time(&now); 
    973         sprintf(errText, "%ld %hd error completing file %s: %s", (long)now, ERR_WRITE, 
     973        sprintf(errText, "%ld %hd error completing file %s: %s", (long)now, (short)ERR_WRITE, 
    974974                outFile, strerror(errno)); 
    975975        fclose(fp); 
     
    10031003    if ( (fp = fopen(tempFile, "wb")) == NULL) { 
    10041004        time(&now); 
    1005         sprintf(errText, "%ld %hd error creating file %s: %s", (long)now, ERR_WRITE, 
     1005        sprintf(errText, "%ld %hd error creating file %s: %s", (long)now, (short)ERR_WRITE, 
    10061006                tempFile, strerror(errno)); 
    10071007        return( -1 ); 
     
    10101010    if ( ret != 1) { 
    10111011        time(&now); 
    1012         sprintf(errText, "%ld %hd error writing file %s: %s", (long)now, ERR_WRITE, 
     1012        sprintf(errText, "%ld %hd error writing file %s: %s", (long)now, (short)ERR_WRITE, 
    10131013                tempFile, strerror(errno)); 
    10141014        fclose(fp); 
     
    10171017    if (fclose(fp) != 0) { 
    10181018        time(&now); 
    1019         sprintf(errText, "%ld %hd error completing file %s: %s", (long)now, ERR_WRITE, 
     1019        sprintf(errText, "%ld %hd error completing file %s: %s", (long)now, (short)ERR_WRITE, 
    10201020                tempFile, strerror(errno)); 
    10211021        fclose(fp); 
     
    10241024    if (rename_ew(tempFile, outFile) != 0) { 
    10251025        time(&now); 
    1026         sprintf(errText, "%ld %hd error moving file %s to %s: %s", (long)now, ERR_WRITE, 
     1026        sprintf(errText, "%ld %hd error moving file %s to %s: %s", (long)now, (short)ERR_WRITE, 
    10271027                tempFile, outFile, strerror(errno)); 
    10281028        return( -1 ); 
  • trunk/src/data_exchange/file2ew/file2ew.c

    r4564 r6852  
    736736   if( type == TypeHeartBeat ) 
    737737   { 
    738         sprintf( msg, "%ld %ld\n\0", (long) t, (long) myPid); 
     738        sprintf( msg, "%ld %ld\n", (long) t, (long) myPid); 
    739739   } 
    740740   else if( type == TypeError ) 
    741741   { 
    742         sprintf( msg, "%ld %hd %s\n\0", (long) t, ierr, note); 
     742        sprintf( msg, "%ld %hd %s\n", (long) t, ierr, note); 
    743743        logit( "et", "%s: %s\n", ProgName, note ); 
    744744   } 
     
    778778/* Assemble pageit message in msg 
    779779   ******************************/ 
    780    sprintf( msg, "group: %s %s#\0", group, note );  
     780   sprintf( msg, "group: %s %s#", group, note );  
    781781   logit("et","%s: Sending TYPE_PAGE msg: %s\n", ProgName, msg ); 
    782782 
  • trunk/src/data_exchange/liss/ew2liss.c

    r2721 r6852  
    242242  if ( pE2L->Ewh.typeHeartbeat == type ) 
    243243  { 
    244     sprintf( outMsg, "%ld %ld\n\0", (long) msgTime, (long) pE2L->MyPid ); 
     244    sprintf( outMsg, "%ld %ld\n", (long) msgTime, (long) pE2L->MyPid ); 
    245245     
    246246    /*Write the message to the output region                            */ 
     
    257257    if ( message )  
    258258    { 
    259       sprintf( outMsg, "%ld %hd %s\n\0", (long) msgTime, code, message ); 
     259      sprintf( outMsg, "%ld %hd %s\n", (long) msgTime, code, message ); 
    260260      logit("t","Error:%d (%s)\n", code, message ); 
    261261    } 
    262262    else  
    263263    { 
    264       sprintf( outMsg, "%ld %hd\n\0", (long) msgTime, code ); 
     264      sprintf( outMsg, "%ld %hd\n", (long) msgTime, code ); 
    265265      logit("t","Error:%d (No description)\n", code ); 
    266266    } 
  • trunk/src/data_exchange/liss/liss2ew.c

    r6803 r6852  
    285285  if ( pL2e->Ewh.typeHeartbeat == type ) 
    286286  { 
    287     sprintf( outMsg, "%ld %ld\n\0", (long) msgTime, (long) pL2e->MyPid ); 
     287    sprintf( outMsg, "%ld %ld\n", (long) msgTime, (long) pL2e->MyPid ); 
    288288     
    289289    /*Write the message to the output region                            */ 
     
    300300    if ( message )  
    301301    { 
    302       sprintf( outMsg, "%ld %hd %s\n\0", (long) msgTime, code, message ); 
     302      sprintf( outMsg, "%ld %hd %s\n", (long) msgTime, code, message ); 
    303303      logit("t","Error:%d (%s)\n", code, message ); 
    304304    } 
    305305    else  
    306306    { 
    307       sprintf( outMsg, "%ld %hd\n\0", (long) msgTime, code ); 
     307      sprintf( outMsg, "%ld %hd\n", (long) msgTime, code ); 
    308308      logit("t","Error:%d (No description)\n", code ); 
    309309    } 
  • trunk/src/data_sources/srpar2ew/srpar2ew.c

    r6803 r6852  
    44494449    if ( time( &TimeNow ) - TimeLastBeat  >=  HeartBeatInterval ) 
    44504450    { 
    4451         sprintf( Msg, "%ld %ld\n\0", (long)TimeNow, (long)MyPid ); /* Fill message string */ 
     4451        sprintf( Msg, "%ld %ld\n", (long)TimeNow, (long)MyPid ); /* Fill message string */ 
    44524452        msgLen    = strlen( Msg );                     /* Set message size    */ 
    44534453        Logo.type = TypeHeartBeat;                     /* Set message type    */ 
     
    45074507   *******************/ 
    45084508   time( &TimeNow ); 
    4509    sprintf( ErrMsg, "%ld %d %s\n\0", (long)TimeNow, ierr, note); /* Fill errmsg str */ 
     4509   sprintf( ErrMsg, "%ld %d %s\n", (long)TimeNow, ierr, note); /* Fill errmsg str */ 
    45104510   msgLen    = strlen( ErrMsg );                           /* Set errmsg size */ 
    45114511   Logo.type = TypeError;                                  /* Set errmsg type */ 
  • trunk/src/seismic_processing/compress_UA/compress_UA.c

    r6803 r6852  
    855855        if (type == TypeHeartBeat) 
    856856        { 
    857                 sprintf (msg, "%ld %ld\n\0", (long) t, (long) MyPid); 
     857                sprintf (msg, "%ld %ld\n", (long) t, (long) MyPid); 
    858858        } 
    859859        else if (type == TypeError) 
    860860        { 
    861                 sprintf (msg, "%ld %hd %s\n\0", (long) t, ierr, note); 
     861                sprintf (msg, "%ld %hd %s\n", (long) t, ierr, note); 
    862862                logit ("et", "compress_UA: %s\n", note); 
    863863        } 
  • trunk/src/seismic_processing/decimate/statrpt.c

    r2710 r6852  
    7676    if ( pDcm->dcmEWH.typeHeartbeat == type ) 
    7777    { 
    78       sprintf( outMsg, "%ld %ld\n\0", (long) msgTime, (long) pDcm->MyPid ); 
     78      sprintf( outMsg, "%ld %ld\n", (long) msgTime, (long) pDcm->MyPid ); 
    7979       
    8080      /*Write the message to the output region                          */ 
     
    9090    { 
    9191      if ( message ) { 
    92         sprintf( outMsg, "%ld %hd %s\n\0", (long) msgTime, code, message ); 
     92        sprintf( outMsg, "%ld %hd %s\n", (long) msgTime, code, message ); 
    9393        logit("t","Error:%d (%s)\n", code, message ); 
    9494      } 
    9595      else { 
    96         sprintf( outMsg, "%ld %hd\n\0", (long) msgTime, code ); 
     96        sprintf( outMsg, "%ld %hd\n", (long) msgTime, code ); 
    9797        logit("t","Error:%d (No description)\n", code ); 
    9898      } 
  • trunk/src/seismic_processing/decompress_UA/decompress_UA.c

    r6803 r6852  
    732732        if (type == TypeHeartBeat) 
    733733        { 
    734                 sprintf (msg, "%ld %ld\n\0", (long) t, (long) MyPid); 
     734                sprintf (msg, "%ld %ld\n", (long) t, (long) MyPid); 
    735735        } 
    736736        else if (type == TypeError) 
    737737        { 
    738                 sprintf (msg, "%ld %hd %s\n\0", (long) t, ierr, note); 
     738                sprintf (msg, "%ld %hd %s\n", (long) t, ierr, note); 
    739739                logit ("et", "decompress_UA: %s\n", note); 
    740740        } 
  • trunk/src/seismic_processing/eqprelim/eqprelim.c

    r6298 r6852  
    13061306   else if( type == TypeError ) 
    13071307   { 
    1308         sprintf( msg, "%ld %d %s\n\0", (long) t, ierr, note); 
     1308        sprintf( msg, "%ld %d %s\n", (long) t, ierr, note); 
    13091309        logit( "et", "eqprelim:  %s\n", note ); 
    13101310   } 
  • trunk/src/seismic_processing/evanstrig/mutils.c

    r2476 r6852  
    9292   for ( i = 0; em[i].id != UNEXPECTED_ERROR && em[i].id != message_id; i++ ); 
    9393   sprintf( message, "ERROR %3d: %s\n", message_id, em[i].text ); 
    94    printf( message ); 
     94   printf( "%s", message ); 
    9595   exit( 1 ); 
    9696} 
  • trunk/src/seismic_processing/loc_wcatwc/locate.c

    r6803 r6852  
    22252225/* Fill message */ 
    22262226   sprintf( pszMsg, "%s %d %lf %lf %lf %lf %d %d %lf %d %lf %s %d %lf " 
    2227                     "%d %lf %d %lf %d %lf %d %lf %d %lf %d %d  \0", 
     2227                    "%d %lf %d %lf %d %lf %d %lf %d %lf %d %d  ", 
    22282228    szTemp, pHypo->iVersion,  
    22292229    pHypo->dOriginTime, pHypo->dLat, pHypo->dLon, 
  • trunk/src/seismic_processing/nll_mgr/nll_mgr.c

    r6803 r6852  
    11521152 
    11531153        time( &tstamp ); 
    1154         sprintf( errMsg, "%ld %d\n\0", (long)tstamp, errNum ); 
     1154        sprintf( errMsg, "%ld %d\n", (long)tstamp, errNum ); 
    11551155 
    11561156        logo.instid = InstId; 
  • trunk/src/seismic_processing/raypicker/rp_messaging.c

    r5863 r6852  
    147147 
    148148#ifdef _WINNT 
    149   _snprintf_s( msg, sizeof(msg), _TRUNCATE, "%ld %hd %s\n", t, 0, szError); 
     149  _snprintf_s( msg, sizeof(msg), _TRUNCATE, "%ld %hd %s\n", t, (short)0, szError); 
    150150#else 
    151   snprintf( msg, sizeof(msg), "%ld %hd %s\n", t, 0, szError); 
     151  snprintf( msg, sizeof(msg), "%ld %hd %s\n", t, (short)0, szError); 
    152152#endif 
    153153 
Note: See TracChangeset for help on using the changeset viewer.