IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30893


Ignore:
Timestamp:
Mar 13, 2011, 5:08:25 PM (15 years ago)
Author:
eugene
Message:

replacing non-standard strcasestr with strstr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psModules/src/camera/pmFPA_JPEG.c

    r29544 r30893  
    3535#include "pmFPAfile.h"
    3636#include "pmFPA_JPEG.h"
    37 
    3837
    3938bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file, const pmConfig *config)
     
    227226    char *userOptions = psMetadataLookupStr(&status, options, "OPTIONS"); // Mode for scaling image
    228227    if (userOptions) {
    229         // just use strstr for now
    230         if (strcasestr(userOptions, "+SB")) {
     228        // just use strstr : strcasestr is non-standard an not always available.  replace with our own?
     229        if (strstr(userOptions, "+SB")) {
    231230            jpegOptions->showScale = PS_JPEG_SHOWSCALE_BOTTOM;
    232231        }
    233         if (strcasestr(userOptions, "-X")) {
     232        if (strstr(userOptions, "-X")) {
    234233            jpegOptions->xFlip = true;
    235234        }
    236         if (strcasestr(userOptions, "-Y")) {
     235        if (strstr(userOptions, "-Y")) {
     236            jpegOptions->yFlip = true;
     237        }
     238        // lowercase versions
     239        if (strstr(userOptions, "+sb")) {
     240            jpegOptions->showScale = PS_JPEG_SHOWSCALE_BOTTOM;
     241        }
     242        if (strstr(userOptions, "-x")) {
     243            jpegOptions->xFlip = true;
     244        }
     245        if (strstr(userOptions, "-y")) {
    237246            jpegOptions->yFlip = true;
    238247        }
Note: See TracChangeset for help on using the changeset viewer.