Files
w3m/indep.h
Fumitoshi UKAI dfd33cccd5 [w3m-dev 03640] Re: cleanup (don't close connection of news server)
* anchor.c (_put_ahchor_news): always conv_str
		(_put_anchor_all): always conv_str
	* etc.c (close_all_fds): deleted
		(close_all_fds_except): added, except fd=f is left open
	* file.c (guess_filename): added
		(UFhalfclose): added
		(convertLine): cleanup_line if not raw mode
			check uf
		(readHeader): always convertLine
		(loadGeneralFile): rewrite
		(loadGopherDir): return Str, args change to ParsedURL and code
				rewrite
		(saveBuffer): always conv_str
		(_doFileCopy): close_all_fds
		(doFileSave): close_all_fds_except
		(uncompress_stream): dup, close_all_fds_except
	* form.c (form_fputs_decode): always conv_str
		(input_textarea): convertLine
	* frame.c (createFrameFile): convertLine
	* ftp.c (loadFTPDir): arg code
				rewrite
		(readFTPDir): convertLine
	* html.h (UFfileno): added
	* image.c (loadImage): close_all_fds
	* indep.h (RAW_MODE): added
	* local.c (loadLocalDir): return Str
		(dirBuffer): rewrite
		(localcgi_popen_r): close_all_fds
	* main.c (main): check SCM_LOCAL
			print err_msg
	* news.c (news_command): args cmd and arg
		(news_quit): news_command
		(openNewsStream): news_command
		(readNewsgroup): deleted
		(loadNewsgroup): added
		(closeNews): added
	* proto.h (loadGopherDir): update
		(conv_str): define for no JP_CHARSET
		(readFTPDir): deleted
		(loadFTPDir): added
		(readNewsgroup): deleted
		(loadNewsgroup): added
		(dirBuffer): deleted
		(loadLocalDir): added
		(close_all_fds): defined by close_all_fds_except
		(close_all_fds_except): added
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
2003-01-15 16:11:43 +00:00

66 lines
2.0 KiB
C

/* $Id: indep.h,v 1.12 2003/01/15 16:11:43 ukai Exp $ */
#ifndef INDEP_H
#define INDEP_H
#include "gc.h"
#include "Str.h"
#include "config.h"
#ifndef TRUE
#define TRUE 1
#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
#define RAW_MODE 0
#define PAGER_MODE 1
#define HTML_MODE 2
#define HEADER_MODE 3
extern clen_t strtoclen(const char *s);
extern char *conv_entity(int ch);
extern int getescapechar(char **s);
extern char *getescapecmd(char **s);
extern char *allocStr(const char *s, int len);
extern int strCmp(const void *s1, const void *s2);
extern char *currentdir(void);
extern char *cleanupName(char *name);
extern char *expandPath(char *name);
#ifndef HAVE_STRCHR
extern char *strchr(const char *s, int c);
#endif /* not HAVE_STRCHR */
#ifndef HAVE_STRCASECMP
extern int strcasecmp(const char *s1, const char *s2);
extern int strncasecmp(const char *s1, const char *s2, size_t n);
#endif /* not HAVE_STRCASECMP */
#ifndef HAVE_STRCASESTR
extern char *strcasestr(const char *s1, const char *s2);
#endif
extern int strcasemstr(char *str, char *srch[], char **ret_ptr);
extern char *remove_space(char *str);
extern int non_null(char *s);
extern void cleanup_line(Str s, int mode);
extern char *html_quote_char(char c);
extern char *html_quote(char *str);
extern char *html_unquote(char *str);
extern char *file_quote(char *str);
extern char *file_unquote(char *str);
extern char *url_quote(char *str);
extern Str Str_url_unquote(Str x, int is_form);
extern Str Str_form_quote(Str x);
#define Str_form_unquote(x) Str_url_unquote((x), TRUE)
extern char *shell_quote(char *str);
extern char *w3m_auxbin_dir();
extern char *w3m_lib_dir();
extern char *w3m_etc_dir();
extern char *w3m_help_dir();
#define New(type) ((type*)GC_MALLOC(sizeof(type)))
#define NewAtom(type) ((type*)GC_MALLOC_ATOMIC(sizeof(type)))
#define New_N(type,n) ((type*)GC_MALLOC((n)*sizeof(type)))
#define NewAtom_N(type,n) ((type*)GC_MALLOC_ATOMIC((n)*sizeof(type)))
#define New_Reuse(type,ptr,n) ((type*)GC_REALLOC((ptr),(n)*sizeof(type)))
#endif /* INDEP_H */