4898794edd81be5285ea6e544acbedeaeb31bf78 max Tue Nov 23 08:10:57 2021 -0800 Fixing pointers to README file for license in all source code files. refs #27614 diff --git src/hg/lib/encode/wgEncodeGencodePdb.c src/hg/lib/encode/wgEncodeGencodePdb.c index 1edc407..38033e1 100644 --- src/hg/lib/encode/wgEncodeGencodePdb.c +++ src/hg/lib/encode/wgEncodeGencodePdb.c @@ -1,126 +1,126 @@ /* wgEncodeGencodePdb.c was originally generated by the autoSql program, which also * generated wgEncodeGencodePdb.h and wgEncodeGencodePdb.sql. This module links the database and * the RAM representation of objects. */ /* Copyright (C) 2011 The Regents of the University of California - * See README in this or parent directory for licensing information. */ + * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "linefile.h" #include "dystring.h" #include "jksql.h" #include "encode/wgEncodeGencodePdb.h" void wgEncodeGencodePdbStaticLoad(char **row, struct wgEncodeGencodePdb *ret) /* Load a row from wgEncodeGencodePdb table into ret. The contents of ret will * be replaced at the next call to this function. */ { ret->transcriptId = row[0]; ret->pdbId = row[1]; } struct wgEncodeGencodePdb *wgEncodeGencodePdbLoad(char **row) /* Load a wgEncodeGencodePdb from row fetched with select * from wgEncodeGencodePdb * from database. Dispose of this with wgEncodeGencodePdbFree(). */ { struct wgEncodeGencodePdb *ret; AllocVar(ret); ret->transcriptId = cloneString(row[0]); ret->pdbId = cloneString(row[1]); return ret; } struct wgEncodeGencodePdb *wgEncodeGencodePdbLoadAll(char *fileName) /* Load all wgEncodeGencodePdb from a whitespace-separated file. * Dispose of this with wgEncodeGencodePdbFreeList(). */ { struct wgEncodeGencodePdb *list = NULL, *el; struct lineFile *lf = lineFileOpen(fileName, TRUE); char *row[2]; while (lineFileRow(lf, row)) { el = wgEncodeGencodePdbLoad(row); slAddHead(&list, el); } lineFileClose(&lf); slReverse(&list); return list; } struct wgEncodeGencodePdb *wgEncodeGencodePdbLoadAllByChar(char *fileName, char chopper) /* Load all wgEncodeGencodePdb from a chopper separated file. * Dispose of this with wgEncodeGencodePdbFreeList(). */ { struct wgEncodeGencodePdb *list = NULL, *el; struct lineFile *lf = lineFileOpen(fileName, TRUE); char *row[2]; while (lineFileNextCharRow(lf, chopper, row, ArraySize(row))) { el = wgEncodeGencodePdbLoad(row); slAddHead(&list, el); } lineFileClose(&lf); slReverse(&list); return list; } struct wgEncodeGencodePdb *wgEncodeGencodePdbCommaIn(char **pS, struct wgEncodeGencodePdb *ret) /* Create a wgEncodeGencodePdb out of a comma separated string. * This will fill in ret if non-null, otherwise will * return a new wgEncodeGencodePdb */ { char *s = *pS; if (ret == NULL) AllocVar(ret); ret->transcriptId = sqlStringComma(&s); ret->pdbId = sqlStringComma(&s); *pS = s; return ret; } void wgEncodeGencodePdbFree(struct wgEncodeGencodePdb **pEl) /* Free a single dynamically allocated wgEncodeGencodePdb such as created * with wgEncodeGencodePdbLoad(). */ { struct wgEncodeGencodePdb *el; if ((el = *pEl) == NULL) return; freeMem(el->transcriptId); freeMem(el->pdbId); freez(pEl); } void wgEncodeGencodePdbFreeList(struct wgEncodeGencodePdb **pList) /* Free a list of dynamically allocated wgEncodeGencodePdb's */ { struct wgEncodeGencodePdb *el, *next; for (el = *pList; el != NULL; el = next) { next = el->next; wgEncodeGencodePdbFree(&el); } *pList = NULL; } void wgEncodeGencodePdbOutput(struct wgEncodeGencodePdb *el, FILE *f, char sep, char lastSep) /* Print out wgEncodeGencodePdb. Separate fields with sep. Follow last field with lastSep. */ { if (sep == ',') fputc('"',f); fprintf(f, "%s", el->transcriptId); if (sep == ',') fputc('"',f); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->pdbId); if (sep == ',') fputc('"',f); fputc(lastSep,f); } /* -------------------------------- End autoSql Generated Code -------------------------------- */