当前位置: 首页>>代码示例>>C++>>正文


C++ freeDyString函数代码示例

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


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


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