AcePerl
view release on metacpan or search on metacpan
acelib/texthelp.c view on Meta::CPAN
/* File: texthelp.c
* Author: Friedemann Wobus (fw@sanger.ac.uk)
* and contributions from Darren Platt (daz@sanger.ac.uk)
*-------------------------------------------------------------------
* This file is part of the ACEDB genome database package, written by
* Richard Durbin (MRC LMB, UK) rd@mrc-lmb.cam.ac.uk, and
* Jean Thierry-Mieg (CRBM du CNRS, France) mieg@kaa.cnrs-mop.fr
*
* Description:
contains contains the code to display an HTML page as plain text
Basic formatting is observed, but images and links are stripped.
* Exported functions:
** helpPrint(char *helpFilename);
* HISTORY:
* Last edited: Dec 4 14:33 1998 (fw)
* * Oct 8 16:01 1998 (fw): removed the declaration of
helpOn and help for #define MACINTOSH
* * Aug 20 16:10 1998 (rd): removed refernces to old help-system
* * Aug 18 17:17 1998 (fw): help-system split into
w1/helpsubs.c (helpDir, HTML stuff etc).
w1/texthelp.c (non-graphical help for tace)
w2/graphhelp.c (graphical help for xace,image etc.)
* ----------------------------------------------------------------------
* ---- major rework, these revision don't necessarily
* ---- affect code still left in this file
* ----------------------------------------------------------------------
* * May 2 01:07 1996 (rd): new implementation of
helpMakeIndex() using filDirectory()
* * May 2 18:24 1996 (mieg):
fall back on oldhelp
callMosaic if (http:)
use freeout for server
jaime's file name rotation
remaining problem: help topic in tace should be case-insensitive
* * May 1 18:24 1996 (fw): fixed freePage() to avoid mem leaks
* * Apr 30 16:18 1996 (fw): fixed #ifdef NON_GRAPHICs for tace
* * Apr 30 16:18 1996 (fw): added image dictionary
* * Apr 29 12:37 1996 (fw): added handling of <DL> lists
* * Apr 25 16:27 1996 (fw): added <IMG > tag
* * Apr 22 17:43 1996 (fw): changed help system to HTML browser
* Created: Thu Feb 20 14:49:50 1992 (mieg)
*-------------------------------------------------------------------
*/
/* $Id: texthelp.c,v 1.1 2002/11/14 20:00:06 lstein Exp $ */
#ifndef MACINTOSH
/********************************************************************/
#include "help_.h"
#include "freeout.h"
/********************************************************************/
static void htmlPagePrint (HtmlPage *page);
static void printTextSection (HtmlNode *node);
/********************************************************************/
static char buf[10000] ; /* text-buffer for wordwrapping */
/********************************************************************/
static float xPos ;
static int indent ;
static int WINX ;
/* dumps out help-page without images and markups */
UTIL_FUNC_DEF BOOL helpPrint (char *helpFilename)
/* returns TRUE if a help page could successfully be displayed
for the given subject, returns FALSE if no such page found */
{
HtmlPage *page ;
Array dirList;
char *cp;
int i,n,x;
if ((page = htmlPageCreate (helpFilename)))
( run in 0.953 second using v1.01-cache-2.11-cpan-39bf76dae61 )