• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ freeDyString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中freeDyString函数的典型用法代码示例。如果您正苦于以下问题:C++ freeDyString函数的具体用法?C++ freeDyString怎么用?C++ freeDyString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了freeDyString函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: xpFree

void xpFree(struct xp **pXp)
/* Free up an xp parser. */
{
int i;
struct xp *xp = *pXp;
if (xp != NULL)
    {
    struct xpStack *stack;
    for (stack = xp->stackBufEnd; --stack >= xp->stackBuf; )
        {
	if (stack->tag == NULL)
	    break;
	freeDyString(&stack->tag);
	freeDyString(&stack->text);
	}
    for (i=0; i<ArraySize(xp->attDyBuf); ++i)
        {
	if (xp->attDyBuf[i] == NULL)
	    break;
	freeDyString(&xp->attDyBuf[i]);
	}
    freeDyString(&xp->endTag);
    freeMem(xp->fileName);
    hashFree(&xp->symHash);
    freez(pXp);
    }
}
开发者ID:JinfengChen,项目名称:pblat,代码行数:27,代码来源:xp.c


示例2: taxonGeneticCodeSaveToDbEscaped

void taxonGeneticCodeSaveToDbEscaped(struct sqlConnection *conn, struct taxonGeneticCode *el, char *tableName, int updateSize)
/* Save taxonGeneticCode as a row to the table specified by tableName.
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically
 * escapes all simple strings (not arrays of string) but may be slower than taxonGeneticCodeSaveToDb().
 * For example automatically copies and converts:
 * "autosql's features include" --> "autosql\'s features include"
 * before inserting into database. */
{
    struct dyString *update = newDyString(updateSize);
    char  *abbr, *name, *tranlsation, *starts, *comments;
    abbr = sqlEscapeString(el->abbr);
    name = sqlEscapeString(el->name);
    tranlsation = sqlEscapeString(el->tranlsation);
    starts = sqlEscapeString(el->starts);
    comments = sqlEscapeString(el->comments);

    dyStringPrintf(update, "insert into %s values ( %u,'%s','%s','%s','%s','%s')",
                   tableName, el->id ,  abbr,  name,  tranlsation,  starts,  comments);
    sqlUpdate(conn, update->string);
    freeDyString(&update);
    freez(&abbr);
    freez(&name);
    freez(&tranlsation);
    freez(&starts);
    freez(&comments);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:27,代码来源:taxonGeneticCode.c


示例3: paraNodeStart

void paraNodeStart(char *machineList)
/* Start node servers on all machines in list. */
{
char *exe = optionVal("exe", "paraNode");
char *rsh = optionVal("rsh", "rsh");
struct lineFile *lf = lineFileOpen(machineList, TRUE);
char *row[2];
struct dyString *dy = newDyString(256);

while (lineFileRow(lf, row))
    {
    char *name = row[0];
    int cpu = atoi(row[1]);
    if (cpu <= 0)
        errAbort("Expecting cpu count in second column, line %d of %s\n",
		lf->lineIx, lf->fileName);
    dyStringClear(dy);
    dyStringPrintf(dy, "%s %s %s start -cpu=%d", rsh, name, exe, cpu);
    carryOption("logFacility", dy);
    carryOption("logMinPriority", dy);
    carryOption("log", dy);
    carryOption("hub", dy);
    carryOption("umask", dy);
    carryOption("sysPath", dy);
    carryOption("userPath", dy);
    carryMultiOption("env", dy);
    carryOption("randomDelay", dy);
    printf("%s\n", dy->string);
    system(dy->string);
    }
lineFileClose(&lf);
freeDyString(&dy);
}
开发者ID:blumroy,项目名称:kentUtils,代码行数:33,代码来源:paraNodeStart.c


示例4: makeItemsItemSaveToDbEscaped

void makeItemsItemSaveToDbEscaped(struct sqlConnection *conn, struct makeItemsItem *el, char *tableName, int updateSize)
/* Save makeItemsItem as a row to the table specified by tableName. 
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically 
 * escapes all simple strings (not arrays of string) but may be slower than makeItemsItemSaveToDb().
 * For example automatically copies and converts: 
 * "autosql's features include" --> "autosql\'s features include" 
 * before inserting into database. */ 
{
struct dyString *update = newDyString(updateSize);
char  *chrom, *name, *strand, *description;
chrom = sqlEscapeString(el->chrom);
name = sqlEscapeString(el->name);
strand = sqlEscapeString(el->strand);
description = sqlEscapeString(el->description);

dyStringPrintf(update, "insert into %s values ( %u,'%s',%u,%u,'%s',%u,'%s',%u,%u,%u,'%s',%u)", 
	tableName,  el->bin,  chrom,  el->chromStart,  el->chromEnd,  name,  el->score,  strand,  el->thickStart,  el->thickEnd,  el->itemRgb,  description,  el->id);
sqlUpdate(conn, update->string);
freeDyString(&update);
freez(&chrom);
freez(&name);
freez(&strand);
freez(&description);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:25,代码来源:makeItemsItem.c


示例5: protVarSaveToDbEscaped

void protVarSaveToDbEscaped(struct sqlConnection *conn, struct protVar *el, char *tableName, int updateSize)
/* Save protVar as a row to the table specified by tableName.
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically
 * escapes all simple strings (not arrays of string) but may be slower than protVarSaveToDb().
 * For example automatically copies and converts:
 * "autosql's features include" --> "autosql\'s features include"
 * before inserting into database. */
{
    struct dyString *update = newDyString(updateSize);
    char  *id, *name, *srcId, *baseChangeType, *location;
    id = sqlEscapeString(el->id);
    name = sqlEscapeString(el->name);
    srcId = sqlEscapeString(el->srcId);
    baseChangeType = sqlEscapeString(el->baseChangeType);
    location = sqlEscapeString(el->location);

    dyStringPrintf(update, "insert into %s values ( '%s','%s','%s','%s','%s',%u)",
                   tableName,  id,  name,  srcId,  baseChangeType,  location,  el->coordinateAccuracy);
    sqlUpdate(conn, update->string);
    freeDyString(&update);
    freez(&id);
    freez(&name);
    freez(&srcId);
    freez(&baseChangeType);
    freez(&location);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:27,代码来源:protVar.c


示例6: nextRepeatPos

int nextRepeatPos(char *chrom, int desiredPos, struct sqlConnection *conn)
/* Find next 0% diverged repeat on the chrom and return midpoint */
{
struct sqlResult *sr;
char **row;
int pos = -1;
int start, end;
struct hTableInfo *hti = hFindTableInfo(db, chrom, "rmsk");
struct dyString *query = newDyString(1024);

if (hti == NULL)
    errAbort("table %s.rmsk doesn't exist", db);
dyStringPrintf(query, "select genoStart,genoEnd from ");
if (hti->isSplit)
    dyStringPrintf(query, "%s_rmsk where ", chrom);
else
    dyStringPrintf(query, "rmsk where %s='%s' AND ", hti->chromField, chrom);
dyStringPrintf(query,
    "(genoStart >= %d AND \
    milliDiv=0 AND \
    repClass<>'Simple_repeat' AND repClass<>'Low_complexity' AND \
    genoEnd-genoStart>%d) order by genoStart limit 1",
        desiredPos, minRepeat);
sr = sqlGetResult(conn, query->string);
freeDyString(&query);

if ((row = sqlNextRow(sr)) != NULL)
    {
    start = sqlSigned(row[0]);
    end = sqlSigned(row[1]);
    pos = start + (end - start)/2;
    }
sqlFreeResult(&sr);
return pos;
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:35,代码来源:mafSplitPos.c


示例7: affy10KDetailsSaveToDbEscaped

void affy10KDetailsSaveToDbEscaped(struct sqlConnection *conn, struct affy10KDetails *el, char *tableName, int updateSize)
/* Save affy10KDetails as a row to the table specified by tableName. 
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically 
 * escapes all simple strings (not arrays of string) but may be slower than affy10KDetailsSaveToDb().
 * For example automatically copies and converts: 
 * "autosql's features include" --> "autosql\'s features include" 
 * before inserting into database. */ 
{
struct dyString *update = newDyString(updateSize);
char  *affyId, *rsId, *tscId, *baseA, *baseB, *sequenceA, *sequenceB, *enzyme;
affyId = sqlEscapeString(el->affyId);
rsId = sqlEscapeString(el->rsId);
tscId = sqlEscapeString(el->tscId);
baseA = sqlEscapeString(el->baseA);
baseB = sqlEscapeString(el->baseB);
sequenceA = sqlEscapeString(el->sequenceA);
sequenceB = sqlEscapeString(el->sequenceB);
enzyme = sqlEscapeString(el->enzyme);

dyStringPrintf(update, "insert into %s values ( '%s','%s','%s','%s','%s','%s','%s','%s')", 
	tableName,  affyId,  rsId,  tscId,  baseA,  baseB,  sequenceA,  sequenceB,  enzyme);
sqlUpdate(conn, update->string);
freeDyString(&update);
freez(&affyId);
freez(&rsId);
freez(&tscId);
freez(&baseA);
freez(&baseB);
freez(&sequenceA);
freez(&sequenceB);
freez(&enzyme);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:33,代码来源:affy10KDetails.c


示例8: protVarLinkSaveToDbEscaped

void protVarLinkSaveToDbEscaped(struct sqlConnection *conn, struct protVarLink *el, char *tableName, int updateSize)
/* Save protVarLink as a row to the table specified by tableName.
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically
 * escapes all simple strings (not arrays of string) but may be slower than protVarLinkSaveToDb().
 * For example automatically copies and converts:
 * "autosql's features include" --> "autosql\'s features include"
 * before inserting into database. */
{
    struct dyString *update = newDyString(updateSize);
    char  *id, *attrType, *raKey, *acc, *displayVal;
    id = sqlEscapeString(el->id);
    attrType = sqlEscapeString(el->attrType);
    raKey = sqlEscapeString(el->raKey);
    acc = sqlEscapeString(el->acc);
    displayVal = sqlEscapeString(el->displayVal);

    dyStringPrintf(update, "insert into %s values ( '%s','%s','%s','%s','%s')",
                   tableName,  id,  attrType,  raKey,  acc,  displayVal);
    sqlUpdate(conn, update->string);
    freeDyString(&update);
    freez(&id);
    freez(&attrType);
    freez(&raKey);
    freez(&acc);
    freez(&displayVal);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:27,代码来源:protVar.c


示例9: hConnectCentral

static char *ccFreezeDbConversion(char *database, char *freeze, char *org)
/* Find freeze given database or vice versa.  Pass in NULL
 * for parameter that is unknown and it will be returned
 * as a result.  This result can be freeMem'd when done. */
{
struct sqlConnection *conn = hConnectCentral();
struct sqlResult *sr;
char **row;
char *ret = NULL;
struct dyString *dy = newDyString(128);

if (database != NULL)
    dyStringPrintf(dy, "select description from dbDb where name = '%s' and (genome like '%s' or genome like 'Zoo')", 
		   database, org);
else if (freeze != NULL)
    dyStringPrintf(dy, "select name from dbDb where description = '%s' and (genome like '%s' or genome like 'Zoo')", 
		   freeze, org);
else
    internalErr();
sr = sqlGetResult(conn, dy->string);
if ((row = sqlNextRow(sr)) != NULL)
    ret = cloneString(row[0]);
sqlFreeResult(&sr);
hDisconnectCentral(&conn);
freeDyString(&dy);
return ret;
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:27,代码来源:hgCoordConv.c


示例10: nextGapPos

int nextGapPos(char *chrom, int desiredPos, struct sqlConnection *conn)
{
/* Find next gap on the chrom and return midpoint */
struct sqlResult *sr;
char **row;
int pos = -1;
int start, end;
struct hTableInfo *hti = hFindTableInfo(db, chrom, "gap");
struct dyString *query = newDyString(1024);

if (hti == NULL)
    errAbort("table %s.gap doesn't exist", db);
dyStringPrintf(query, "select chromStart,chromEnd from ");
if (hti->isSplit)
    dyStringPrintf(query, "%s_gap where ", chrom);
else
    dyStringPrintf(query, "gap where %s='%s' AND ", hti->chromField, chrom);

dyStringPrintf(query, "(chromStart >= %d and chromEnd-chromStart > %d)\
    order by chromStart limit 1",
        desiredPos, minGap);
sr = sqlGetResult(conn, query->string);
freeDyString(&query);

if ((row = sqlNextRow(sr)) != NULL)
    {
    start = sqlSigned(row[0]);
    end = sqlSigned(row[1]);
    pos = start + (end - start)/2;
    }
sqlFreeResult(&sr);
return pos;
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:33,代码来源:mafSplitPos.c


示例11: cutterSaveToDbEscaped

void cutterSaveToDbEscaped(struct sqlConnection *conn, struct cutter *el, char *tableName, int updateSize)
/* Save cutter as a row to the table specified by tableName. 
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically 
 * escapes all simple strings (not arrays of string) but may be slower than cutterSaveToDb().
 * For example automatically copies and converts: 
 * "autosql's features include" --> "autosql\'s features include" 
 * before inserting into database. */ 
{
struct dyString *update = newDyString(updateSize);
char  *name, *seq, *scizsArray, *companiesArray, *refsArray;
name = sqlEscapeString(el->name);
seq = sqlEscapeString(el->seq);

scizsArray = sqlStringArrayToString(el->scizs, el->numSciz);
companiesArray = sqlCharArrayToString(el->companies, el->numCompanies);
refsArray = sqlUnsignedArrayToString(el->refs, el->numRefs);
dyStringPrintf(update, "insert into %s values ( '%s',%u,%u,'%s',%u,%d,%u,%u,%u,'%s',%u,'%s',%u,'%s')", 
	tableName,  name, el->size , el->matchSize ,  seq, el->cut , el->overhang , el->palindromic , el->semicolon , el->numSciz ,  scizsArray , el->numCompanies ,  companiesArray , el->numRefs ,  refsArray );
sqlUpdate(conn, update->string);
freeDyString(&update);
freez(&name);
freez(&seq);
freez(&scizsArray);
freez(&companiesArray);
freez(&refsArray);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:27,代码来源:cutter.c


示例12: affyAtlasSaveToDbEscaped

void affyAtlasSaveToDbEscaped(struct sqlConnection *conn, struct affyAtlas *el, char *tableName, int updateSize)
/* Save affyAtlas as a row to the table specified by tableName. 
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically 
 * escapes all simple strings (not arrays of string) but may be slower than affyAtlasSaveToDb().
 * For example automatically copies and converts: 
 * "autosql's features include" --> "autosql\'s features include" 
 * before inserting into database. */ 
{
struct dyString *update = newDyString(updateSize);
char  *annName, *probeSet, *detection, *tissue;
annName = sqlEscapeString(el->annName);
probeSet = sqlEscapeString(el->probeSet);
detection = sqlEscapeString(el->detection);
tissue = sqlEscapeString(el->tissue);

dyStringPrintf(update, "insert into %s values ( '%s','%s',%f,'%s',%f,'%s')", 
	tableName,  annName,  probeSet, el->signal ,  detection, el->pval ,  tissue);
sqlUpdate(conn, update->string);
freeDyString(&update);
freez(&annName);
freez(&probeSet);
freez(&detection);
freez(&tissue);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:25,代码来源:affyAtlas.c


示例13: tfbsConsSaveToDbEscaped

void tfbsConsSaveToDbEscaped(struct sqlConnection *conn, struct tfbsCons *el, char *tableName, int updateSize)
/* Save tfbsCons as a row to the table specified by tableName. 
 * As blob fields may be arbitrary size updateSize specifies the approx size.
 * of a string that would contain the entire query. Automatically 
 * escapes all simple strings (not arrays of string) but may be slower than tfbsConsSaveToDb().
 * For example automatically copies and converts: 
 * "autosql's features include" --> "autosql\'s features include" 
 * before inserting into database. */ 
{
struct dyString *update = newDyString(updateSize);
char  *chrom, *name, *strand, *species, *factor, *id;
chrom = sqlEscapeString(el->chrom);
name = sqlEscapeString(el->name);
strand = sqlEscapeString(el->strand);
species = sqlEscapeString(el->species);
factor = sqlEscapeString(el->factor);
id = sqlEscapeString(el->id);

dyStringPrintf(update, "insert into %s values ( '%s',%u,%u,'%s',%u,'%s','%s','%s','%s')", 
	tableName,  chrom, el->chromStart , el->chromEnd ,  name, el->score ,  strand,  species,  factor,  id);
sqlUpdate(conn, update->string);
freeDyString(&update);
freez(&chrom);
freez(&name);
freez(&strand);
freez(&species);
freez(&factor);
freez(&id);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:29,代码来源:tfbsCons.c


示例14: doSubmitToGreat

void doSubmitToGreat(const char *path)
/* Send a URL to GREAT that it can use to retrieve the results. */
{
struct dyString *requestName = getRequestName();
struct dyString *requestURL = dyStringCreate("http://%s/%s", cgiServerNamePort(), path);
struct dyString *greatRequest;

greatRequest = dyStringCreate(
    "<meta http-equiv='refresh' content='0;url=http://great.stanford.edu/public/cgi-bin/greatStart.php?requestURL=%s&requestSpecies=%s&requestName=%s&requestSender=UCSC%20Table%20Browser'>",
    dyStringContents(requestURL), database, dyStringContents(requestName));

hPrintf("<b>GREAT</b> is processing BED data from \"%s\"...please wait.\n", dyStringContents(requestName));
hWrites(dyStringContents(greatRequest));
freeDyString(&greatRequest);
freeDyString(&requestName);
freeDyString(&requestURL);
}
开发者ID:Nicholas-NVS,项目名称:kentUtils,代码行数:17,代码来源:great.c


示例15: correctOne

void correctOne(struct dnaSeq *est, struct psl *psl, char *nibDir, 
   struct hash *nibHash, FILE *f)
/* Write one corrected EST to file. */
{
struct dnaSeq *geno = readCachedNib(nibHash, nibDir, psl->tName, 
	psl->tStart, psl->tEnd - psl->tStart);
struct dyString *t = newDyString(est->size+20);
int qSize = psl->qSize;
int tSize = psl->tSize;
int qLastEnd = 0;
int blockIx;
struct mrnaBlock *mbList, *mb;
int genoOffset = psl->tStart;
boolean isRc = FALSE;

/* Load sequence and alignment blocks, coping with reverse
 * strand as necessary. */
toUpperN(geno->dna, geno->size);	/* This helps debug... */
mbList = mrnaBlockFromPsl(psl);
if (psl->strand[0] == '-')
    {
    reverseComplement(geno->dna, geno->size);
    genoOffset = tSize - psl->tEnd;
    for (mb = mbList; mb != NULL; mb = mb->next)
         {
	 reverseIntRange(&mb->tStart, &mb->tEnd, tSize);
	 reverseIntRange(&mb->qStart, &mb->qEnd, qSize);
	 }
    slReverse(&mbList);
    isRc = TRUE;
    }

/* Make t have corrected sequence. */
for (mb = mbList; mb != NULL; mb = mb->next)
    {
    int qStart = mb->qStart;
    int qEnd = mb->qEnd;
    int uncovSize = qStart - qLastEnd;
    if (uncovSize > 0)
	dyStringAppendN(t, est->dna + qLastEnd, uncovSize);
    dyStringAppendN(t, geno->dna + mb->tStart - genoOffset, 
    	mb->tEnd - mb->tStart);
    qLastEnd = qEnd;
    }
if (qLastEnd != qSize)
    {
    int uncovSize = qSize - qLastEnd;
    dyStringAppendN(t, est->dna + qLastEnd, uncovSize);
    }

/* Output */
faWriteNext(f, est->name, t->string, t->stringSize);

/* Clean up time. */
slFreeList(&mbList);
freeDyString(&t);
freeDnaSeq(&geno);
}
开发者ID:elmargb,项目名称:kentUtils,代码行数:58,代码来源:correctEst.c


示例16: getTransFromFile

void getTransFromFile(FILE* infile, char *path)
{
FILE* outfile = NULL;
int start, end, tmNumber, count, seqLength;
char *line, *token;
struct dyString *proteinID = newDyString(24);
start = end = tmNumber = count = seqLength = 0;
while( ( line  = readLine(infile) ) != NULL )
    {  /*grab the protein ID after each <PRE> tag*/
    while( (token = nextWord(&line)) != NULL )
        {
   	    if( sameString(token,"<PRE>#"))
                {  /*create a new xml file*/
                token = nextWord(&line);
       	        dyStringAppend(proteinID, token);
                token = lastWordInLine(line);
                seqLength = atoi(token);
                }
            if( sameString(token,"predicted") )
                {   /*grab the number of transmembrane helices*/
                token = lastWordInLine(line);
                tmNumber = atoi(token);
                    if(tmNumber > 0)
                        {
                        outfile = createXMLFile(proteinID->string, path);
                        populateXMLFile(outfile, tmNumber, proteinID->string, path);
                        }
                }
            if( sameString(token,"</PRE>") )
                {  /*close the xml file*/
                carefulClose(&outfile);
  	        dyStringClear(proteinID);
                count = 0;
                }
            if( sameString(token,"TMhelix") )
                {
                    if( (token = nextWord(&line)) != NULL )
                         {  /*get the start*/
                         start = atoi(token);
                              if( (token = nextWord(&line)) != NULL  )
                                  end = atoi(token);
                         }
                    if( count == 0)
                        addCoordinatesToXMLFile(outfile, 1, start-1, "N-term", count);
                    count++;
                    addCoordinatesToXMLFile(outfile, start, end, "TM", count);
                    if( count == tmNumber && outfile != NULL )
                        {
                        addCoordinatesToXMLFile(outfile,end+1,seqLength,"C-term",count);
                        finishXMLFile(outfile, proteinID->string, seqLength);
                        }
                }
        } /*end inner while*/
    }   /*end outer while*/
    freeMem(line);
    freeDyString(&proteinID);
}
开发者ID:CEpBrowser,项目名称:CEpBrowser--from-UCSC-CGI-BIN,代码行数:57,代码来源:gpcrParser.c


示例17: cgiParseMultipart

static struct mimePart * cgiParseMultipart(int fd, FILE *out, boolean autoBoundary)
/* process a multipart form */
{
char h[1024];  /* hold mime header line */
char *s = NULL;
struct dyString *dy = newDyString(256);
struct mimeBuf *mb = NULL;
struct mimePart *mp = NULL;
char **env = NULL;

if (altHeader)
    {
    /* find the CONTENT_ environment strings, use to make Alternate Header string for MIME */
    for(env=environ; *env; env++)
	if (startsWith("CONTENT_",*env))
	    {
	    //debug
	    //fprintf(stderr,"%s\n",*env);  //debug
	    safef(h,sizeof(h),"%s",*env);
	    /* change env syntax to MIME style header, from _ to - */
	    s = strchr(h,'_');    
	    if (!s)
		errAbort("expecting '_' parsing env var %s for MIME alt header", *env);
	    *s = '-';
	    /* change env syntax to MIME style header, from = to : */
	    s = strchr(h,'=');
	    if (!s)
		errAbort("expecting '=' parsing env var %s for MIME alt header", *env);
	    *s = ':';
	    dyStringPrintf(dy,"%s\r\n",h);
	    }
    dyStringAppend(dy,"\r\n"); /* blank line at end means end of headers */
    fprintf(out,"Alternate Header Text:\n%s",dy->string);
    }

mb = initMimeBuf(fd);

if (altHeader)
    mp = parseMultiParts(mb, cloneString(dy->string)); /* The Alternate Header will get freed */
else if (autoBoundary)    
    mp = parseMultiParts(mb, "autoBoundary"); 
else    
    mp = parseMultiParts(mb, NULL); 

if(!mp->multi) /* expecting multipart child parts */
    errAbort("Malformatted multipart-form.");

freeDyString(&dy);

freez(&mb);


printMimeInfo(mp, out, 0);

return mp;
}
开发者ID:blumroy,项目名称:kentUtils,代码行数:56,代码来源:mimeTester.c


示例18: sshSelf

void sshSelf(char *hostList, char *host, int start, char *destFile, char *lockDir)
/* Execute ssh command to invoke self. */
{
struct dyString *dy = newDyString(512);
dyStringPrintf(dy, 
        "ssh -x %s /projects/compbio/experiments/hg/bin/i386/ccCp %s %s %d %s &",
	host, destFile, hostList, start, lockDir);
system(dy->string);
freeDyString(&dy);
}
开发者ID:blumroy,项目名称:kentUtils,代码行数:10,代码来源:ccCp.3.c


示例19: rshSelf

void rshSelf(char *hostList, char *host, int start, char *destFile, char *lockDir)
/* Execute rsh command to invoke self. */
{
struct dyString *dy = newDyString(512);
dyStringPrintf(dy, 
        "rsh %s /cse/guests/kent/bin/i386/ccCp %s %s %d %s &",
	host, destFile, hostList, start, lockDir);
system(dy->string);
freeDyString(&dy);
}
开发者ID:sktu,项目名称:kentUtils,代码行数:10,代码来源:ccCp.c


示例20: cpFile

int cpFile(char *source, char *destFile)
/* Execute cp command to copy file to host. */
{
struct dyString *dy = newDyString(512);
int ret;

dyStringPrintf(dy, "cp %s %s",  source, destFile);
ret = system(dy->string);
freeDyString(&dy);
return ret;
}
开发者ID:blumroy,项目名称:kentUtils,代码行数:11,代码来源:ccCp.3.c



注:本文中的freeDyString函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ freeGenQueryOut函数代码示例发布时间:2022-05-30
下一篇:
C++ freeData函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap