This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| void | htmlSetCookie (char *name, char *value, char *expires, char *path, char *domain, boolean isSecure) |
| void | htmlParagraph (char *line,...) |
| void | htmlVaParagraph (char *line, va_list args) |
| void | htmlCenterParagraph (char *line,...) |
| void | htmlHorizontalLine () |
| void | htmlNbSpaces (int count) |
| void | htmHorizontalLine (FILE *f) |
| void | htmTextOut (FILE *f, char *s) |
| void | htmlTextOut (char *s) |
| char * | htmlEncode (char *s) |
| void | htmlMemDeath () |
| void | htmlStart (char *title) |
| void | htmStart (FILE *f, char *title) |
| void | htmlEnd () |
| void | htmEnd (FILE *f) |
| void | htmlSetStyle (char *style) |
| void | htmlSetBackground (char *imageFile) |
| void | htmlSetBgColor (int color) |
| void | htmlEchoInput () |
| void | htmlBadVar (char *varName) |
| void | htmlImage (char *fileName, int width, int height) |
| void | htmlVaWarn (char *format, va_list args) |
| char * | htmlWarnStartPattern () |
| char * | htmlWarnEndPattern () |
| void | htmlAbort () |
| void | htmlPushEarlyHandlers () |
| void | htmErrOnlyShell (void(*doMiddle)()) |
| void | htmEmptyShell (void(*doMiddle)(), char *method) |
| void | htmShell (char *title, void(*doMiddle)(), char *method) |
| void | htmShellWithHead (char *title, char *head, void(*doMiddle)(), char *method) |
| void | htmlNoEscape () |
| void | htmlDoEscape () |
| void | htmlIncludeWebFile (char *file) |
| void | htmlIncludeFile (char *path) |
Variables | |
| char * | htmlStyleUndecoratedLink |
| jmp_buf | htmlRecover |
| void htmEmptyShell | ( | void(*)() | doMiddle, | |
| char * | method | |||
| ) |
Definition at line 408 of file htmshell.c.
References htmlAbort(), htmlRecover, htmlVaWarn(), popAbortHandler(), popWarnHandler(), pushAbortHandler(), and pushWarnHandler().
Referenced by htmShell(), and htmShellWithHead().
00410 { 00411 int status; 00412 00413 /* Set up error recovery (for out of memory and the like) 00414 * so that we finish web page regardless of problems. */ 00415 pushAbortHandler(htmlAbort); 00416 pushWarnHandler(htmlVaWarn); 00417 status = setjmp(htmlRecover); 00418 00419 /* Do your main thing. */ 00420 if (status == 0) 00421 { 00422 doMiddle(); 00423 } 00424 00425 popWarnHandler(); 00426 popAbortHandler(); 00427 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmEnd | ( | FILE * | f | ) |
Definition at line 367 of file htmshell.c.
Referenced by doDetailLine(), and htmlEnd().
Here is the caller graph for this function:

| void htmErrOnlyShell | ( | void(*)() | doMiddle | ) |
Definition at line 393 of file htmshell.c.
References htmlRecover.
00395 { 00396 int status; 00397 00398 /* Set up error recovery. */ 00399 status = setjmp(htmlRecover); 00400 00401 /* Do your main thing. */ 00402 if (status == 0) 00403 { 00404 doMiddle(); 00405 } 00406 }
| void htmHorizontalLine | ( | FILE * | f | ) |
Definition at line 74 of file htmshell.c.
Referenced by pslShowAlignmentStranded().
Here is the caller graph for this function:

| void htmlAbort | ( | ) |
Definition at line 218 of file htmshell.c.
References htmlRecover.
Referenced by htmEmptyShell().
00220 { 00221 longjmp(htmlRecover, -1); 00222 }
Here is the caller graph for this function:

| void htmlBadVar | ( | char * | varName | ) |
Definition at line 382 of file htmshell.c.
References cgiBadVar().
00383 { 00384 cgiBadVar(varName); 00385 }
Here is the call graph for this function:

| void htmlCenterParagraph | ( | char * | line, | |
| ... | ||||
| ) |
Definition at line 60 of file htmshell.c.
References htmlVaCenterParagraph().
00061 { 00062 va_list args; 00063 va_start(args, line); 00064 htmlVaCenterParagraph(line, args); 00065 va_end(args); 00066 }
Here is the call graph for this function:

| void htmlDoEscape | ( | ) |
| void htmlEchoInput | ( | ) |
| char* htmlEncode | ( | char * | s | ) |
Definition at line 127 of file htmshell.c.
References needMem().
00129 { 00130 size_t len = 0; 00131 char c; 00132 char *encStr; 00133 char *p = s; 00134 /* First pass through s to determine encoded length to allocate: */ 00135 /* [as a shortcut, we could simply allocate 6*length of s] */ 00136 while ((c = *p++) != 0) 00137 { 00138 switch (c) 00139 { 00140 case '>': 00141 case '<': 00142 len += 4; 00143 break; 00144 case '&': 00145 len += 5; 00146 break; 00147 case '"': 00148 len += 6; 00149 break; 00150 default: 00151 len++; 00152 break; 00153 } 00154 } 00155 encStr = needMem(len+1); 00156 /* Second pass through s to encode: */ 00157 len = 0; 00158 p = s; 00159 while ((c = *p++) != 0) 00160 { 00161 switch (c) 00162 { 00163 case '>': 00164 strcat(encStr+len, ">"); 00165 len += 4; 00166 break; 00167 case '<': 00168 strcat(encStr+len, "<"); 00169 len += 4; 00170 break; 00171 case '&': 00172 strcat(encStr+len, "&"); 00173 len += 5; 00174 break; 00175 case '"': 00176 strcat(encStr+len, """); 00177 len += 6; 00178 break; 00179 default: 00180 encStr[len++] = c; 00181 break; 00182 } 00183 } 00184 return encStr; 00185 }
Here is the call graph for this function:

| void htmlEnd | ( | ) |
Definition at line 373 of file htmshell.c.
References htmEnd().
Referenced by htmShell(), and htmShellWithHead().
00374 { 00375 htmEnd(stdout); 00376 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmlHorizontalLine | ( | ) |
Definition at line 68 of file htmshell.c.
References htmlParagraph().
Referenced by htmlVaWarn().
00070 { 00071 htmlParagraph("<HR ALIGN=\"CENTER\">"); 00072 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmlImage | ( | char * | fileName, | |
| int | width, | |||
| int | height | |||
| ) |
Definition at line 388 of file htmshell.c.
00389 { 00390 printf("<P ALIGN=\"CENTER\"><IMG SRC=\"%s\" WIDTH=\"%d\" HEIGHT=\"%d\" ALIGN=\"BOTTOM\" BORDER=\"0\"></P>", fileName, width, height); 00391 }
| void htmlIncludeFile | ( | char * | path | ) |
Definition at line 479 of file htmshell.c.
References errAbort(), fileExists(), freeMem(), and readInGulp().
Referenced by htmlIncludeWebFile().
00480 { 00481 char *str = NULL; 00482 size_t len = 0; 00483 00484 if (path == NULL) 00485 errAbort("Program error: including null file"); 00486 if (!fileExists(path)) 00487 errAbort("Missing file %s", path); 00488 readInGulp(path, &str, &len); 00489 00490 if (len <= 0) 00491 errAbort("Error reading included file: %s", path); 00492 00493 puts(str); 00494 freeMem(str); 00495 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmlIncludeWebFile | ( | char * | file | ) |
Definition at line 499 of file htmshell.c.
References htmlIncludeFile(), and safef().
00500 { 00501 char path[256]; 00502 char *docRoot = "/usr/local/apache/htdocs"; 00503 00504 safef(path, sizeof path, "%s/%s", docRoot, file); 00505 htmlIncludeFile(path); 00506 }
Here is the call graph for this function:

| void htmlMemDeath | ( | ) |
Definition at line 224 of file htmshell.c.
References errAbort().
00225 { 00226 errAbort("Out of memory."); 00227 }
Here is the call graph for this function:

| void htmlNbSpaces | ( | int | count | ) |
| void htmlNoEscape | ( | ) |
| void htmlParagraph | ( | char * | line, | |
| ... | ||||
| ) |
Definition at line 44 of file htmshell.c.
References htmlVaParagraph().
Referenced by htmlHorizontalLine().
00045 { 00046 va_list args; 00047 va_start(args, line); 00048 htmlVaParagraph(line, args); 00049 va_end(args); 00050 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmlPushEarlyHandlers | ( | ) |
Definition at line 250 of file htmshell.c.
References earlyAbortHandler(), earlyWarningHandler(), pushAbortHandler(), and pushWarnHandler().
Referenced by main().
00253 { 00254 pushWarnHandler(earlyWarningHandler); 00255 pushAbortHandler(earlyAbortHandler); 00256 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmlSetBackground | ( | char * | imageFile | ) |
Definition at line 284 of file htmshell.c.
References htmlBackground.
Referenced by main().
00287 { 00288 htmlBackground = imageFile; 00289 }
Here is the caller graph for this function:

| void htmlSetBgColor | ( | int | color | ) |
Definition at line 294 of file htmshell.c.
References gotBgColor, htmlBgColor, and TRUE.
00297 { 00298 htmlBgColor = color; 00299 gotBgColor = TRUE; 00300 }
| void htmlSetCookie | ( | char * | name, | |
| char * | value, | |||
| char * | expires, | |||
| char * | path, | |||
| char * | domain, | |||
| boolean | isSecure | |||
| ) |
Definition at line 302 of file htmshell.c.
References cgiEncode(), and TRUE.
00304 { 00305 char* encoded_name; 00306 char* encoded_value; 00307 char* encoded_path = NULL; 00308 00309 encoded_name = cgiEncode(name); 00310 encoded_value = cgiEncode(value); 00311 if(path != NULL) 00312 encoded_path = cgiEncode(path); 00313 00314 printf("Set-Cookie: %s=%s; ", encoded_name, encoded_value); 00315 00316 if(expires != NULL) 00317 printf("expires=%s; ", expires); 00318 00319 if(path != NULL) 00320 printf("path=%s; ", encoded_path); 00321 00322 if(domain != NULL) 00323 printf("domain=%s; ", domain); 00324 00325 if(isSecure == TRUE) 00326 printf("secure"); 00327 00328 printf("\n"); 00329 }
Here is the call graph for this function:

| void htmlSetStyle | ( | char * | style | ) |
Definition at line 273 of file htmshell.c.
References htmlStyle.
00278 { 00279 htmlStyle = style; 00280 }
| void htmlStart | ( | char * | title | ) |
Definition at line 349 of file htmshell.c.
References _htmStart().
Referenced by earlyWarningHandler(), and htmShell().
00351 { 00352 puts("Content-Type:text/html"); 00353 puts("\n"); 00354 00355 puts("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">"); 00356 _htmStart(stdout, title); 00357 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmlTextOut | ( | char * | s | ) |
Definition at line 121 of file htmshell.c.
References htmTextOut().
00123 { 00124 htmTextOut(stdout, s); 00125 }
Here is the call graph for this function:

| void htmlVaParagraph | ( | char * | line, | |
| va_list | args | |||
| ) |
Definition at line 36 of file htmshell.c.
Referenced by earlyWarningHandler(), htmlParagraph(), and htmlVaWarn().
00038 { 00039 fputs("<P>", stdout); 00040 vfprintf(stdout, line, args); 00041 fputs("</P>\n", stdout); 00042 }
Here is the caller graph for this function:

| void htmlVaWarn | ( | char * | format, | |
| va_list | args | |||
| ) |
Definition at line 200 of file htmshell.c.
References htmlHorizontalLine(), htmlVaParagraph(), htmlWarnEndPattern(), htmlWarnStartPattern(), and va_copy.
Referenced by htmEmptyShell().
00202 { 00203 va_list argscp; 00204 va_copy(argscp, args); 00205 00206 htmlHorizontalLine(); 00207 printf("%s", htmlWarnStartPattern()); 00208 htmlVaParagraph(format,args); 00209 printf("%s", htmlWarnEndPattern()); 00210 htmlHorizontalLine(); 00211 00212 /* write warning/error message to stderr so they get logged. */ 00213 vfprintf(stderr, format, argscp); 00214 va_end(argscp); 00215 fputc('\n', stderr); 00216 }
Here is the call graph for this function:

Here is the caller graph for this function:

| char* htmlWarnEndPattern | ( | ) |
Definition at line 194 of file htmshell.c.
Referenced by earlyWarningHandler(), htmlVaWarn(), and qaScanForErrorMessage().
Here is the caller graph for this function:

| char* htmlWarnStartPattern | ( | ) |
Definition at line 188 of file htmshell.c.
Referenced by earlyWarningHandler(), htmlVaWarn(), and qaScanForErrorMessage().
Here is the caller graph for this function:

| void htmShell | ( | char * | title, | |
| void(*)() | doMiddle, | |||
| char * | method | |||
| ) |
Definition at line 434 of file htmshell.c.
References dnaUtilOpen(), htmEmptyShell(), htmlEnd(), and htmlStart().
Referenced by webBlat().
00435 { 00436 /* Preamble. */ 00437 dnaUtilOpen(); 00438 htmlStart(title); 00439 00440 /* Call wrapper for error handling. */ 00441 htmEmptyShell(doMiddle, method); 00442 00443 /* Post-script. */ 00444 htmlEnd(); 00445 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmShellWithHead | ( | char * | title, | |
| char * | head, | |||
| void(*)() | doMiddle, | |||
| char * | method | |||
| ) |
Definition at line 456 of file htmshell.c.
References dnaUtilOpen(), htmEmptyShell(), htmlBackground, and htmlEnd().
00457 { 00458 /* Preamble. */ 00459 dnaUtilOpen(); 00460 00461 puts("Content-Type:text/html"); 00462 puts("\n"); 00463 00464 puts("<HTML>"); 00465 printf("<HEAD>%s<TITLE>%s</TITLE>\n</HEAD>\n\n", head, title); 00466 if (htmlBackground == NULL) 00467 puts("<BODY>\n"); 00468 else 00469 printf("<BODY BACKGROUND=\"%s\">\n", htmlBackground); 00470 00471 /* Call wrapper for error handling. */ 00472 htmEmptyShell(doMiddle, method); 00473 00474 /* Post-script. */ 00475 htmlEnd(); 00476 }
Here is the call graph for this function:

| void htmStart | ( | FILE * | f, | |
| char * | title | |||
| ) |
Definition at line 359 of file htmshell.c.
References _htmStart().
Referenced by doDetailLine().
00361 { 00362 fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n", f); 00363 _htmStart(f, title); 00364 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void htmTextOut | ( | FILE * | f, | |
| char * | s | |||
| ) |
Definition at line 88 of file htmshell.c.
References NoEscape.
Referenced by htmlTextOut().
00090 { 00091 char c; 00092 if (NoEscape) 00093 { 00094 fputs(s, f); 00095 return; 00096 } 00097 00098 while ((c = *s++) != 0) 00099 { 00100 switch (c) 00101 { 00102 case '>': 00103 fputs(">", f); 00104 break; 00105 case '<': 00106 fputs("<", f); 00107 break; 00108 case '&': 00109 fputs("&", f); 00110 break; 00111 case '"': 00112 fputs(""", f); 00113 break; 00114 default: 00115 fputc(c, f); 00116 break; 00117 } 00118 } 00119 }
Here is the caller graph for this function:

| jmp_buf htmlRecover |
Definition at line 88 of file htmshell.h.
Referenced by htmEmptyShell(), htmErrOnlyShell(), and htmlAbort().
| char* htmlStyleUndecoratedLink |
Definition at line 265 of file htmshell.c.
1.5.2