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/gsid/gsidSubj/demog.c src/hg/gsid/gsidSubj/demog.c index 897fb34..a7bfd16 100644 --- src/hg/gsid/gsidSubj/demog.c +++ src/hg/gsid/gsidSubj/demog.c @@ -1,110 +1,110 @@ /* demog - do Demographic section. */ /* Copyright (C) 2013 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 "hash.h" #include "linefile.h" #include "dystring.h" #include "cheapcgi.h" #include "spDb.h" #include "gsidSubj.h" #include "hdb.h" #include "net.h" static boolean demogExists(struct section *section, struct sqlConnection *conn, char *subjId) /* Return TRUE if demogAll table exists and it has an entry with the gene symbol */ { if (sqlTableExists(conn, "gsidSubjInfo") == TRUE) { return(TRUE); } return(FALSE); } static void demogPrint(struct section *section, struct sqlConnection *conn, char *subjId) /* Print out GAD section. */ { char *gender, *age, *race; char *location; char query[256]; struct sqlResult *sr; char **row; char *weight, *riskFactor; char *comment; sqlSafef(query, sizeof(query), "select gender, age, race, geography, riskFactor, weight, comment from gsidSubjInfo where subjId='%s'", subjId); sr = sqlMustGetResult(conn, query); row = sqlNextRow(sr); if (row != NULL) { printf("<TABLE>"); gender = row[0]; age = row[1]; race = row[2]; location = row[3]; riskFactor = row[4]; weight = row[5]; comment = row[6]; printf("<TR>"); printf("<TD>"); printf("<B>subject ID:</B> %s%s", subjId, GSBLANKS); printf("</TD>"); printf("</TR>"); printf("<TR>"); printf("<TD>"); printf("<B>gender:</B> %s%s", gender, GSBLANKS); printf("</TD>"); printf("<TD>"); printf("<B>age:</B> %s%s", age, GSBLANKS); printf("</TD>"); printf("<TD>"); printf("<B>risk factor:</B> %s%s", riskFactor, GSBLANKS); printf("</TD>"); printf("</TR>"); printf("<TR>"); printf("<TD>"); printf("<B>race:</B> %s%s\n", race, GSBLANKS); printf("</TD>"); printf("<TD>"); printf("<B>weight(kg):</B> %s\n", weight); printf("</TD>"); printf("<TD>"); printf("<B>location:</B> %s\n", location); printf("</TD>"); printf("</TR>"); printf("</TABLE>"); /* put out the special comment if it exists */ if (!sameWord(comment, "")) { printf("<BR>"); printf("<B>Special Comment:</B> %s\n", comment); } } sqlFreeResult(&sr); return; } struct section *demogSection(struct sqlConnection *conn, struct hash *sectionRa) /* Create demog section. */ { struct section *section = sectionNew(sectionRa, "demog"); section->exists = demogExists; section->print = demogPrint; return section; }