1
/* $Id: fm.h,v 1.149 2010/08/20 09:47:09 htrb Exp $ */
3
* w3m: WWW wo Miru utility
7
* You can use,copy,modify and distribute this program without any permission.
15
#define _GNU_SOURCE /* strcasestr() */
22
#include <sys/types.h>
46
typedef int wc_ces; /* XXX: not used */
53
#define setlocale(category, locale) /* empty */
58
#define _(String) gettext (String)
59
#define N_(String) (String)
61
# undef bindtextdomain
62
# define bindtextdomain(Domain, Directory) /* empty */
64
# define textdomain(Domain) /* empty */
66
# define N_(Text) Text
67
# define gettext(Text) Text
73
#include "parsetagx.h"
77
#include "funcname1.h"
81
void bcopy(const void *, void *, int);
82
void bzero(void *, int);
83
#endif /* HAVE_BCOPY */
85
#include <strings.h> /* for bzero() and bcopy() */
91
#else /* not MAINPROGRAM */
94
#endif /* not MAINPROGRAM */
96
#define DEFUN(funcname, macroname, docstring) void funcname(void)
101
#define LINELEN 256 /* Initial line length */
102
#define PAGER_MAX_LINE 10000 /* Maximum line kept as pager */
104
#define MAXIMUM_COLS 1024
105
#define DEFAULT_COLS 80
108
#define MAX_IMAGE 1000
109
#define MAX_IMAGE_SIZE 2048
111
#define DEFAULT_PIXEL_PER_CHAR 7.0 /* arbitrary */
112
#define DEFAULT_PIXEL_PER_LINE 14.0 /* arbitrary */
114
#define DEFAULT_PIXEL_PER_CHAR 8.0 /* arbitrary */
116
#define MINIMUM_PIXEL_PER_CHAR 4.0
117
#define MAXIMUM_PIXEL_PER_CHAR 32.0
130
#define SHELLBUFFERNAME "*Shellout*"
131
#define PIPEBUFFERNAME "*stream*"
132
#define CPIPEBUFFERNAME "*stream(closed)*"
134
#define DICTBUFFERNAME "*dictionary*"
135
#endif /* USE_DICT */
141
#define P_CHARTYPE 0x3f00
143
#define PC_ASCII (WTF_TYPE_ASCII << 8)
144
#define PC_CTRL (WTF_TYPE_CTRL << 8)
145
#define PC_WCHAR1 (WTF_TYPE_WCHAR1 << 8)
146
#define PC_WCHAR2 (WTF_TYPE_WCHAR2 << 8)
147
#define PC_KANJI (WTF_TYPE_WIDE << 8)
148
#define PC_KANJI1 (PC_WCHAR1 | PC_KANJI)
149
#define PC_KANJI2 (PC_WCHAR2 | PC_KANJI)
150
#define PC_UNKNOWN (WTF_TYPE_UNKNOWN << 8)
151
#define PC_UNDEF (WTF_TYPE_UNDEF << 8)
153
#define PC_ASCII 0x0000
154
#define PC_CTRL 0x0100
156
#define PC_SYMBOL 0x8000
158
/* Effect ( standout/underline ) */
159
#define P_EFFECT 0x40ff
160
#define PE_NORMAL 0x00
162
#define PE_UNDER 0x02
163
#define PE_STAND 0x04
165
#define PE_ANCHOR 0x10
167
#define PE_IMAGE 0x20
169
#define PE_ACTIVE 0x80
170
#define PE_VISITED 0x4000
173
#define PE_EX_ITALIC 0x01
174
#define PE_EX_INSERT 0x02
175
#define PE_EX_STRIKE 0x04
177
#define PE_EX_ITALIC_E PE_UNDER
178
#define PE_EX_INSERT_E PE_UNDER
179
#define PE_EX_STRIKE_E PE_STAND
181
#define CharType(c) ((c)&P_CHARTYPE)
182
#define CharEffect(c) ((c)&(P_EFFECT|PC_SYMBOL))
183
#define SetCharType(v,c) ((v)=(((v)&~P_CHARTYPE)|(c)))
186
#define COLPOS(l,c) calcPosition(l->lineBuf,l->propBuf,l->len,c,0,CP_AUTO)
188
/* Flags for displayBuffer() */
190
#define B_FORCE_REDRAW 1
193
#define B_REDRAW_IMAGE 4
195
/* Buffer Property */
196
#define BP_NORMAL 0x0
199
#define BP_INTERNAL 0x8
200
#define BP_NO_URL 0x10
201
#define BP_REDIRECTED 0x20
202
#define BP_CLOSE 0x40
206
#define LB_FRAME 0 /* rFrame() */
208
#define LB_INFO 2 /* pginfo() */
210
#define LB_SOURCE 4 /* vwSrc() */
211
#define LB_N_SOURCE LB_SOURCE
216
#define SR_NOTFOUND 0x2
217
#define SR_WRAPPED 0x4
220
int REV_LB[MAX_LB] = {
221
LB_N_FRAME, LB_FRAME, LB_N_INFO, LB_INFO, LB_N_SOURCE,
223
#else /* not MAINPROGRAM */
225
#endif /* not MAINPROGRAM */
227
/* mark URL, Message-ID */
231
/* Flags for calcPosition() */
235
/* Completion status. */
241
#define CPL_NEVER 0x0
244
#define CPL_ALWAYS 0x4
247
/* Flags for inputLine() */
248
#define IN_STRING 0x10
249
#define IN_FILENAME 0x20
250
#define IN_PASSWORD 0x40
251
#define IN_COMMAND 0x80
253
#define IN_CHAR 0x200
255
#define IMG_FLAG_SKIP 1
256
#define IMG_FLAG_AUTO 2
258
#define IMG_FLAG_START 0
259
#define IMG_FLAG_STOP 1
260
#define IMG_FLAG_NEXT 2
262
#define IMG_FLAG_UNLOADED 0
263
#define IMG_FLAG_LOADED 1
264
#define IMG_FLAG_ERROR 2
265
#define IMG_FLAG_DONT_REMOVE 4
267
#define IS_EMPTY_PARSED_URL(pu) ((pu)->scheme == SCM_UNKNOWN && !(pu)->file)
268
#define SCONF_RESERVED 0
269
#define SCONF_SUBSTITUTE_URL 1
270
#define SCONF_URL_CHARSET 2
271
#define SCONF_NO_REFERER_FROM 3
272
#define SCONF_NO_REFERER_TO 4
273
#define SCONF_N_FIELD 5
274
#define query_SCONF_SUBSTITUTE_URL(pu) ((const char *)querySiteconf(pu, SCONF_SUBSTITUTE_URL))
275
#define query_SCONF_URL_CHARSET(pu) ((const wc_ces *)querySiteconf(pu, SCONF_URL_CHARSET))
276
#define query_SCONF_NO_REFERER_FROM(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_FROM))
277
#define query_SCONF_NO_REFERER_TO(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_TO))
283
#define inputLineHist(p,d,f,h) inputLineHistSearch(p,d,f,h,NULL)
284
#define inputLine(p,d,f) inputLineHist(p,d,f,NULL)
285
#define inputStr(p,d) inputLine(p,d,IN_STRING)
286
#define inputStrHist(p,d,h) inputLineHist(p,d,IN_STRING,h)
287
#define inputFilename(p,d) inputLine(p,d,IN_FILENAME)
288
#define inputFilenameHist(p,d,h) inputLineHist(p,d,IN_FILENAME,h)
289
#define inputChar(p) inputLine(p,"",IN_CHAR)
291
#define free(x) GC_free(x) /* let GC do it. */
294
#define HAVE_STRCASECMP
295
#define strcasecmp stricmp
296
#define strncasecmp strnicmp
300
#define SKIP_BLANKS(p) {while(*(p)&&IS_SPACE(*(p)))(p)++;}
301
#define SKIP_NON_BLANKS(p) {while(*(p)&&!IS_SPACE(*(p)))(p)++;}
302
#define IS_ENDL(c) ((c)=='\0'||(c)=='\r'||(c)=='\n')
303
#define IS_ENDT(c) (IS_ENDL(c)||(c)==';')
306
(((a).line - (b).line) ? ((a).line - (b).line) : ((a).pos - (b).pos))
308
#define RELATIVE_WIDTH(w) (((w)>=0)?(int)((w)/pixel_per_char):(w))
309
#define REAL_WIDTH(w,limit) (((w)>=0)?(int)((w)/pixel_per_char):-(w)*(limit)/100)
311
#define EOL(l) (&(l)->ptr[(l)->length])
312
#define IS_EOL(p,l) ((p)==&(l)->ptr[(l)->length])
318
typedef unsigned short Lineprop;
319
#ifdef USE_ANSI_COLOR
320
typedef unsigned char Linecolor;
323
typedef struct _MapArea {
336
typedef struct _MapList {
339
struct _MapList *next;
342
typedef struct _Line {
345
#ifdef USE_ANSI_COLOR
352
long linenumber; /* on buffer */
353
long real_linenumber; /* on file */
354
unsigned short usrflags;
367
typedef struct _imageCache {
379
typedef struct _image {
395
typedef struct _anchor {
400
unsigned char accesskey;
412
#define NO_REFERER ((char*)-1)
414
typedef struct _anchorList {
428
#define LINK_TYPE_NONE 0
429
#define LINK_TYPE_REL 1
430
#define LINK_TYPE_REV 2
431
typedef struct _LinkList {
433
char *title; /* Next, Contents, ... */
434
char *ctype; /* Content-Type */
435
char type; /* Rel, Rev */
436
struct _LinkList *next;
439
typedef struct _Buffer {
446
struct _Buffer *nextBuffer;
447
struct _Buffer *linkBuffer[MAX_LB];
463
InputStream pagerSource;
467
AnchorList *formitem;
471
HmarkerList *hmarklist;
472
HmarkerList *imarklist;
473
ParsedURL currentURL;
478
struct frameset *frameset;
479
struct frameset_queue *frameQ;
484
wc_ces document_charset;
485
wc_uint8 auto_detect;
487
TextList *document_header;
488
FormItemList *form_submit;
491
struct mailcap *mailcap;
492
char *mailcap_source;
496
char *ssl_certificate;
502
struct _BufferPos *undo;
504
struct _AlarmEvent *event;
508
typedef struct _BufferPos {
514
struct _BufferPos *next;
515
struct _BufferPos *prev;
518
typedef struct _TabBuffer {
519
struct _TabBuffer *nextTab;
520
struct _TabBuffer *prevTab;
521
Buffer *currentBuffer;
528
typedef struct _DownloadList {
537
struct _DownloadList *next;
538
struct _DownloadList *prev;
540
#define DOWNLOAD_LIST_TITLE "Download List Panel"
542
#define COPY_BUFROOT(dstbuf, srcbuf) {\
543
(dstbuf)->rootX = (srcbuf)->rootX; \
544
(dstbuf)->rootY = (srcbuf)->rootY; \
545
(dstbuf)->COLS = (srcbuf)->COLS; \
546
(dstbuf)->LINES = (srcbuf)->LINES; \
549
#define COPY_BUFPOSITION(dstbuf, srcbuf) {\
550
(dstbuf)->topLine = (srcbuf)->topLine; \
551
(dstbuf)->currentLine = (srcbuf)->currentLine; \
552
(dstbuf)->pos = (srcbuf)->pos; \
553
(dstbuf)->cursorX = (srcbuf)->cursorX; \
554
(dstbuf)->cursorY = (srcbuf)->cursorY; \
555
(dstbuf)->visualpos = (srcbuf)->visualpos; \
556
(dstbuf)->currentColumn = (srcbuf)->currentColumn; \
558
#define SAVE_BUFPOSITION(sbufp) COPY_BUFPOSITION(sbufp, Currentbuf)
559
#define RESTORE_BUFPOSITION(sbufp) COPY_BUFPOSITION(Currentbuf, sbufp)
560
#define TOP_LINENUMBER(buf) ((buf)->topLine ? (buf)->topLine->linenumber : 1)
561
#define CUR_LINENUMBER(buf) ((buf)->currentLine ? (buf)->currentLine->linenumber : 1)
563
#define NO_BUFFER ((Buffer*)1)
565
#define RB_STACK_SIZE 10
567
#define TAG_STACK_SIZE 10
569
#define FONT_STACK_SIZE 5
571
#define FONTSTAT_SIZE 7
573
#define _INIT_BUFFER_WIDTH (COLS - (showLineNum ? 6 : 1))
574
#define INIT_BUFFER_WIDTH ((_INIT_BUFFER_WIDTH > 0) ? _INIT_BUFFER_WIDTH : 0)
575
#define FOLD_BUFFER_WIDTH (FoldLine ? (INIT_BUFFER_WIDTH + 1) : -1)
577
struct input_alt_attr {
581
Str type, name, value;
591
struct input_alt_attr input_alt;
592
char fontstat[FONTSTAT_SIZE];
606
long flag_stack[RB_STACK_SIZE];
609
unsigned char end_tag;
614
struct input_alt_attr input_alt;
615
char fontstat[FONTSTAT_SIZE];
616
char fontstat_stack[FONT_STACK_SIZE][FONTSTAT_SIZE];
620
struct cmdtable *tag_stack[TAG_STACK_SIZE];
626
#define in_bold fontstat[0]
627
#define in_under fontstat[1]
628
#define in_italic fontstat[2]
629
#define in_strike fontstat[3]
630
#define in_ins fontstat[4]
631
#define in_stand fontstat[5]
634
#define RB_SCRIPT 0x02
635
#define RB_STYLE 0x04
636
#define RB_PLAIN 0x08
638
#define RB_CENTER 0x20
639
#define RB_RIGHT 0x40
640
#define RB_ALIGN (RB_LEFT| RB_CENTER | RB_RIGHT)
643
#define RB_PRE_INT 0x200
644
#define RB_IN_DT 0x400
645
#define RB_INTXTA 0x800
646
#define RB_INSELECT 0x1000
647
#define RB_IGNORE_P 0x2000
648
#define RB_TITLE 0x4000
649
#define RB_NFLUSHED 0x8000
650
#define RB_NOFRAMES 0x10000
651
#define RB_INTABLE 0x20000
652
#define RB_PREMODE (RB_PRE | RB_PRE_INT | RB_SCRIPT | RB_STYLE | RB_PLAIN | RB_INTXTA)
653
#define RB_SPECIAL (RB_PRE | RB_PRE_INT | RB_SCRIPT | RB_STYLE | RB_PLAIN | RB_NOBR)
654
#define RB_PLAIN_PRE 0x40000
657
#define RB_FILL 0x80000
658
#endif /* FORMAT_NICE */
659
#define RB_DEL 0x100000
660
#define RB_S 0x200000
662
#define RB_GET_ALIGN(obuf) ((obuf)->flag&RB_ALIGN)
663
#define RB_SET_ALIGN(obuf,align) {(obuf)->flag &= ~RB_ALIGN; (obuf)->flag |= (align); }
664
#define RB_SAVE_FLAG(obuf) {\
665
if ((obuf)->flag_sp < RB_STACK_SIZE) \
666
(obuf)->flag_stack[(obuf)->flag_sp++] = RB_GET_ALIGN(obuf); \
668
#define RB_RESTORE_FLAG(obuf) {\
669
if ((obuf)->flag_sp > 0) \
670
RB_SET_ALIGN(obuf,(obuf)->flag_stack[--(obuf)->flag_sp]); \
674
#define R_ST_NORMAL 0 /* normal */
675
#define R_ST_TAG0 1 /* within tag, just after < */
676
#define R_ST_TAG 2 /* within tag */
677
#define R_ST_QUOTE 3 /* within single quote */
678
#define R_ST_DQUOTE 4 /* within double quote */
679
#define R_ST_EQL 5 /* = */
680
#define R_ST_AMP 6 /* within ampersand quote */
681
#define R_ST_EOL 7 /* end of file */
682
#define R_ST_CMNT1 8 /* <! */
683
#define R_ST_CMNT2 9 /* <!- */
684
#define R_ST_CMNT 10 /* within comment */
685
#define R_ST_NCMNT1 11 /* comment - */
686
#define R_ST_NCMNT2 12 /* comment -- */
687
#define R_ST_NCMNT3 13 /* comment -- space */
688
#define R_ST_IRRTAG 14 /* within irregular tag */
689
#define R_ST_VALUE 15 /* within tag attribule value */
691
#define ST_IS_REAL_TAG(s) ((s)==R_ST_TAG||(s)==R_ST_TAG0||(s)==R_ST_EQL||(s)==R_ST_VALUE)
693
/* is this '<' really means the beginning of a tag? */
694
#define REALLY_THE_BEGINNING_OF_A_TAG(p) \
695
(IS_ALPHA(p[1]) || p[1] == '/' || p[1] == '!' || p[1] == '?' || p[1] == '\0' || p[1] == '_')
697
/* flags for loadGeneralFile */
700
#define RG_FRAME_SRC 4
702
struct html_feed_environ {
703
struct readbuffer *obuf;
709
struct environment *envs;
720
struct portlist *next;
732
struct portlist *portl;
741
#define COO_DISCARD 16
742
#define COO_OVERRIDE 32 /* user chose to override security checks */
744
#define COO_OVERRIDE_OK 32 /* flag to specify that an error is overridable */
745
/* version 0 refers to the original cookie_spec.html */
746
/* version 1 refers to RFC 2109 */
747
/* version 1' refers to the Internet draft to obsolete RFC 2109 */
748
#define COO_EINTERNAL (1) /* unknown error; probably forgot to convert "return 1" in cookie.c */
749
#define COO_ETAIL (2 | COO_OVERRIDE_OK) /* tail match failed (version 0) */
750
#define COO_ESPECIAL (3) /* special domain check failed (version 0) */
751
#define COO_EPATH (4) /* Path attribute mismatch (version 1 case 1) */
752
#define COO_ENODOT (5 | COO_OVERRIDE_OK) /* no embedded dots in Domain (version 1 case 2.1) */
753
#define COO_ENOTV1DOM (6 | COO_OVERRIDE_OK) /* Domain does not start with a dot (version 1 case 2.2) */
754
#define COO_EDOM (7 | COO_OVERRIDE_OK) /* domain-match failed (version 1 case 3) */
755
#define COO_EBADHOST (8 | COO_OVERRIDE_OK) /* dot in matched host name in FQDN (version 1 case 4) */
756
#define COO_EPORT (9) /* Port match failed (version 1' case 5) */
757
#define COO_EMAX COO_EPORT
758
#endif /* USE_COOKIE */
760
/* modes for align() */
762
#define ALIGN_CENTER 0
764
#define ALIGN_RIGHT 2
765
#define ALIGN_MIDDLE 4
767
#define ALIGN_BOTTOM 6
769
#define VALIGN_MIDDLE 0
771
#define VALIGN_BOTTOM 2
773
typedef struct http_request {
780
#define HR_COMMAND_GET 0
781
#define HR_COMMAND_POST 1
782
#define HR_COMMAND_CONNECT 2
783
#define HR_COMMAND_HEAD 3
785
#define HR_FLAG_LOCAL 1
786
#define HR_FLAG_PROXY 2
788
#define HTST_UNKNOWN 255
789
#define HTST_MISSING 254
790
#define HTST_NORMAL 0
791
#define HTST_CONNECT 1
797
#define TMPF_COOKIE 4
798
#define MAX_TMPF_TYPE 5
800
#define set_no_proxy(domains) (NO_proxy_domains=make_domain_list(domains))
806
extern int LINES, COLS;
807
#if defined(__CYGWIN__)
809
#else /* not defined(__CYGWIN__) */
810
#define LASTLINE (LINES-1)
811
#endif /* not defined(__CYGWIN__) */
813
global int Tabstop init(8);
814
global int IndentIncr init(4);
815
global int ShowEffect init(TRUE);
816
global int PagerMax init(PAGER_MAX_LINE);
818
global char SearchHeader init(FALSE);
819
global char *DefaultType init(NULL);
820
global char RenderFrame init(FALSE);
821
global char TargetSelf init(FALSE);
822
global char PermitSaveToPipe init(FALSE);
823
global char DecodeCTE init(FALSE);
824
global char AutoUncompress init(FALSE);
825
global char PreserveTimestamp init(TRUE);
826
global char ArgvIsURL init(FALSE);
827
global char MetaRefresh init(FALSE);
829
global char fmInitialized init(FALSE);
830
global char QuietMessage init(FALSE);
831
global char TrapSignal init(TRUE);
832
#define TRAP_ON if (TrapSignal) { \
833
prevtrap = mySignal(SIGINT, KeyAbort); \
837
#define TRAP_OFF if (TrapSignal) { \
841
mySignal(SIGINT, prevtrap); \
844
extern unsigned char GlobalKeymap[];
845
extern unsigned char EscKeymap[];
846
extern unsigned char EscBKeymap[];
847
extern unsigned char EscDKeymap[];
849
extern unsigned char PcKeymap[];
851
extern FuncList w3mFuncList[];
853
global char *HTTP_proxy init(NULL);
855
global char *HTTPS_proxy init(NULL);
858
global char *GOPHER_proxy init(NULL);
859
#endif /* USE_GOPHER */
860
global char *FTP_proxy init(NULL);
861
global ParsedURL HTTP_proxy_parsed;
863
global ParsedURL HTTPS_proxy_parsed;
866
global ParsedURL GOPHER_proxy_parsed;
867
#endif /* USE_GOPHER */
868
global ParsedURL FTP_proxy_parsed;
869
global char *NO_proxy init(NULL);
870
global int NOproxy_netaddr init(TRUE);
872
#define DNS_ORDER_UNSPEC 0
873
#define DNS_ORDER_INET_INET6 1
874
#define DNS_ORDER_INET6_INET 2
875
#define DNS_ORDER_INET_ONLY 4
876
#define DNS_ORDER_INET6_ONLY 6
877
global int DNS_order init(DNS_ORDER_UNSPEC);
878
extern int ai_family_order_table[7][3]; /* XXX */
880
global TextList *NO_proxy_domains;
881
global char NoCache init(FALSE);
882
global char use_proxy init(TRUE);
883
#define Do_not_use_proxy (!use_proxy)
884
global int Do_not_use_ti_te init(FALSE);
886
global char *NNTP_server init(NULL);
887
global char *NNTP_mode init(NULL);
888
global int MaxNewsMessage init(50);
891
global char *document_root init(NULL);
892
global char *personal_document_root init(NULL);
893
global char *cgi_bin init(NULL);
894
global char *index_file init(NULL);
896
global char *CurrentDir;
897
global int CurrentPid;
899
* global Buffer *Currentbuf;
900
* global Buffer *Firstbuf;
902
global TabBuffer *CurrentTab;
903
global TabBuffer *FirstTab;
904
global TabBuffer *LastTab;
905
global int open_tab_blank init(FALSE);
906
global int open_tab_dl_list init(FALSE);
907
global int close_tab_back init(FALSE);
909
global int TabCols init(10);
910
#define NO_TABBUFFER ((TabBuffer *)1)
911
#define Currentbuf (CurrentTab->currentBuffer)
912
#define Firstbuf (CurrentTab->firstBuffer)
913
global DownloadList *FirstDL init(NULL);
914
global DownloadList *LastDL init(NULL);
915
global int CurrentKey;
916
global char *CurrentKeyData;
917
global char *CurrentCmdData;
918
global char *w3m_reqlog;
919
extern char *w3m_version;
921
#define DUMP_BUFFER 0x01
922
#define DUMP_HEAD 0x02
923
#define DUMP_SOURCE 0x04
924
#define DUMP_EXTRA 0x08
925
#define DUMP_HALFDUMP 0x10
926
#define DUMP_FRAME 0x20
927
global int w3m_debug;
928
global int w3m_dump init(0);
929
#define w3m_halfdump (w3m_dump & DUMP_HALFDUMP)
930
global int w3m_halfload init(FALSE);
931
global Str header_string init(NULL);
932
global int override_content_type init(FALSE);
935
global int useColor init(TRUE);
936
global int basic_color init(8); /* don't change */
937
global int anchor_color init(4); /* blue */
938
global int image_color init(2); /* green */
939
global int form_color init(1); /* red */
941
global int bg_color init(8); /* don't change */
942
global int mark_color init(6); /* cyan */
943
#endif /* USE_BG_COLOR */
944
global int useActiveColor init(FALSE);
945
global int active_color init(6); /* cyan */
946
global int useVisitedColor init(FALSE);
947
global int visited_color init(5); /* magenta */
948
#endif /* USE_COLOR */
949
global int confirm_on_quit init(TRUE);
951
global int use_mark init(FALSE);
953
global int emacs_like_lineedit init(FALSE);
954
global int vi_prec_num init(FALSE);
955
global int label_topline init(FALSE);
956
global int nextpage_topline init(FALSE);
957
global char *displayTitleTerm init(NULL);
958
global int displayLink init(FALSE);
959
global int displayLinkNumber init(FALSE);
960
global int displayLineInfo init(FALSE);
961
global int DecodeURL init(FALSE);
962
global int retryAsHttp init(TRUE);
963
global int showLineNum init(FALSE);
964
global int show_srch_str init(TRUE);
966
global char *Imgdisplay init(IMGDISPLAY);
967
global int activeImage init(FALSE);
968
global int displayImage init(TRUE);
969
global int autoImage init(TRUE);
970
global int useExtImageViewer init(TRUE);
971
global int maxLoadImage init(4);
972
global int image_map_list init(TRUE);
974
global int displayImage init(FALSE); /* XXX: emacs-w3m use display_image=off */
976
global int pseudoInlines init(TRUE);
977
global char *Editor init(DEF_EDITOR);
979
global char *Mailer init(NULL);
981
global char *Mailer init(DEF_MAILER);
984
#define MAILTO_OPTIONS_USE_W3MMAILER 0
986
#define MAILTO_OPTIONS_IGNORE 1
987
#define MAILTO_OPTIONS_USE_MAILTO_URL 2
988
global int MailtoOptions init(MAILTO_OPTIONS_IGNORE);
989
global char *ExtBrowser init(DEF_EXT_BROWSER);
990
global char *ExtBrowser2 init(NULL);
991
global char *ExtBrowser3 init(NULL);
992
global int BackgroundExtViewer init(TRUE);
993
global int disable_secret_security_check init(FALSE);
994
global char *passwd_file init(PASSWD_FILE);
995
global char *pre_form_file init(PRE_FORM_FILE);
996
global char *siteconf_file init(SITECONF_FILE);
997
global char *ftppasswd init(NULL);
998
global int ftppass_hostnamegen init(TRUE);
999
global int do_download init(FALSE);
1001
global char *image_source init(NULL);
1003
global char *UserAgent init(NULL);
1004
global int NoSendReferer init(FALSE);
1005
global char *AcceptLang init(NULL);
1006
global char *AcceptEncoding init(NULL);
1007
global char *AcceptMedia init(NULL);
1008
global int WrapDefault init(FALSE);
1009
global int IgnoreCase init(TRUE);
1010
global int WrapSearch init(FALSE);
1011
global int squeezeBlankLine init(FALSE);
1012
global char *BookmarkFile init(NULL);
1013
global int UseExternalDirBuffer init(TRUE);
1014
global char *DirBufferCommand init("file:///$LIB/dirlist" CGI_EXTENSION);
1016
global int UseDictCommand init(FALSE);
1017
global char *DictCommand init("file:///$LIB/w3mdict" CGI_EXTENSION);
1018
#endif /* USE_DICT */
1019
global int ignore_null_img_alt init(TRUE);
1020
#define DISPLAY_INS_DEL_SIMPLE 0
1021
#define DISPLAY_INS_DEL_NORMAL 1
1022
#define DISPLAY_INS_DEL_FONTIFY 2
1023
global int displayInsDel init(DISPLAY_INS_DEL_NORMAL);
1024
global int FoldTextarea init(FALSE);
1025
global int FoldLine init(FALSE);
1026
#define DEFAULT_URL_EMPTY 0
1027
#define DEFAULT_URL_CURRENT 1
1028
#define DEFAULT_URL_LINK 2
1029
global int DefaultURLString init(DEFAULT_URL_EMPTY);
1030
global int MarkAllPages init(FALSE);
1033
global int use_migemo init(FALSE);
1034
global int migemo_active init(0);
1035
global char *migemo_command init(DEF_MIGEMO_COMMAND);
1036
#endif /* USE_MIGEMO */
1038
global struct auth_cookie *Auth_cookie init(NULL);
1040
global struct cookie *First_cookie init(NULL);
1041
#endif /* USE_COOKIE */
1043
global char *mailcap_files init(USER_MAILCAP ", " SYS_MAILCAP);
1044
global char *mimetypes_files init(USER_MIMETYPES ", " SYS_MIMETYPES);
1045
#ifdef USE_EXTERNAL_URI_LOADER
1046
global char *urimethodmap_files init(USER_URIMETHODMAP ", " SYS_URIMETHODMAP);
1049
global TextList *fileToDelete;
1051
extern Hist *LoadHist;
1052
extern Hist *SaveHist;
1053
extern Hist *URLHist;
1054
extern Hist *ShellHist;
1055
extern Hist *TextHist;
1057
global int UseHistory init(TRUE);
1058
global int URLHistSize init(100);
1059
global int SaveURLHist init(TRUE);
1060
#endif /* USE_HISTORY */
1061
global int multicolList init(FALSE);
1064
global wc_ces InnerCharset init(WC_CES_WTF); /* Don't change */
1065
global wc_ces DisplayCharset init(DISPLAY_CHARSET);
1066
global wc_ces DocumentCharset init(DOCUMENT_CHARSET);
1067
global wc_ces SystemCharset init(SYSTEM_CHARSET);
1068
global wc_ces BookmarkCharset init(SYSTEM_CHARSET);
1069
global char ExtHalfdump init(FALSE);
1070
global char FollowLocale init(TRUE);
1071
global char UseContentCharset init(TRUE);
1072
global char SearchConv init(TRUE);
1073
global char SimplePreserveSpace init(FALSE);
1074
#define Str_conv_from_system(x) wc_Str_conv((x), SystemCharset, InnerCharset)
1075
#define Str_conv_to_system(x) wc_Str_conv_strict((x), InnerCharset, SystemCharset)
1076
#define Str_conv_to_halfdump(x) (ExtHalfdump ? wc_Str_conv((x), InnerCharset, DisplayCharset) : (x))
1077
#define conv_from_system(x) wc_conv((x), SystemCharset, InnerCharset)->ptr
1078
#define conv_to_system(x) wc_conv_strict((x), InnerCharset, SystemCharset)->ptr
1079
#define url_quote_conv(x,c) url_quote(wc_conv_strict((x), InnerCharset, (c))->ptr)
1081
#define Str_conv_from_system(x) (x)
1082
#define Str_conv_to_system(x) (x)
1083
#define Str_conv_to_halfdump(x) (x)
1084
#define conv_from_system(x) (x)
1085
#define conv_to_system(x) (x)
1086
#define url_quote_conv(x,c) url_quote(x)
1087
#define wc_Str_conv(x,charset0,charset1) (x)
1088
#define wc_Str_conv_strict(x,charset0,charset1) (x)
1090
global char UseAltEntity init(TRUE);
1091
#define GRAPHIC_CHAR_ASCII 2
1092
#define GRAPHIC_CHAR_DEC 1
1093
#define GRAPHIC_CHAR_CHARSET 0
1094
global char UseGraphicChar init(GRAPHIC_CHAR_CHARSET);
1095
extern char *graph_symbol[];
1096
extern char *graph2_symbol[];
1097
extern int symbol_width;
1098
extern int symbol_width0;
1099
#define N_GRAPH_SYMBOL 32
1100
#define SYMBOL_BASE 0x20
1101
global int no_rc_dir init(FALSE);
1102
global char *rc_dir init(NULL);
1103
global char *tmp_dir;
1104
global char *config_file init(NULL);
1107
global int use_mouse init(TRUE);
1108
extern int mouseActive;
1109
global int reverse_mouse init(FALSE);
1110
global int relative_wheel_scroll init(FALSE);
1111
global int fixed_wheel_scroll_count init(5);
1112
global int relative_wheel_scroll_ratio init(30);
1113
typedef struct _MouseActionMap {
1117
typedef struct _MouseAction {
1125
MouseActionMap default_map[3];
1126
MouseActionMap anchor_map[3];
1127
MouseActionMap active_map[3];
1128
MouseActionMap tab_map[3];
1129
MouseActionMap *menu_map[3];
1130
MouseActionMap *lastline_map[3];
1132
global MouseAction mouse_action;
1133
#define LIMIT_MOUSE_MENU 100
1134
#endif /* USE_MOUSE */
1137
global int default_use_cookie init(TRUE);
1138
global int use_cookie init(FALSE);
1139
global int show_cookie init(TRUE);
1140
global int accept_cookie init(FALSE);
1141
#define ACCEPT_BAD_COOKIE_DISCARD 0
1142
#define ACCEPT_BAD_COOKIE_ACCEPT 1
1143
#define ACCEPT_BAD_COOKIE_ASK 2
1144
global int accept_bad_cookie init(ACCEPT_BAD_COOKIE_DISCARD);
1145
global char *cookie_reject_domains init(NULL);
1146
global char *cookie_accept_domains init(NULL);
1147
global char *cookie_avoid_wrong_number_of_dots init(NULL);
1148
global TextList *Cookie_reject_domains;
1149
global TextList *Cookie_accept_domains;
1150
global TextList *Cookie_avoid_wrong_number_of_dots_domains;
1151
#endif /* USE_COOKIE */
1154
global int view_unseenobject init(FALSE);
1156
global int view_unseenobject init(TRUE);
1159
#if defined(USE_SSL) && defined(USE_SSL_VERIFY)
1160
global int ssl_verify_server init(FALSE);
1161
global char *ssl_cert_file init(NULL);
1162
global char *ssl_key_file init(NULL);
1163
global char *ssl_ca_path init(NULL);
1164
global char *ssl_ca_file init(NULL);
1165
global int ssl_path_modified init(FALSE);
1166
#endif /* defined(USE_SSL) &&
1167
* defined(USE_SSL_VERIFY) */
1169
global char *ssl_forbid_method init(NULL);
1172
global int is_redisplay init(FALSE);
1173
global int clear_buffer init(TRUE);
1174
global double pixel_per_char init(DEFAULT_PIXEL_PER_CHAR);
1175
global int set_pixel_per_char init(FALSE);
1177
global double pixel_per_line init(DEFAULT_PIXEL_PER_LINE);
1178
global int set_pixel_per_line init(FALSE);
1179
global double image_scale init(100);
1181
global int use_lessopen init(FALSE);
1183
global char *keymap_file init(KEYMAP_FILE);
1186
#define get_mctype(c) ((Lineprop)wtf_type((wc_uchar *)(c)) << 8)
1187
#define get_mclen(c) wtf_len1((wc_uchar *)(c))
1188
#define get_mcwidth(c) wtf_width((wc_uchar *)(c))
1189
#define get_strwidth(c) wtf_strwidth((wc_uchar *)(c))
1190
#define get_Str_strwidth(c) wtf_strwidth((wc_uchar *)((c)->ptr))
1192
#define get_mctype(c) (IS_CNTRL(*(c)) ? PC_CTRL : PC_ASCII)
1193
#define get_mclen(c) 1
1194
#define get_mcwidth(c) 1
1195
#define get_strwidth(c) strlen(c)
1196
#define get_Str_strwidth(c) ((c)->length)
1199
global int FollowRedirection init(10);
1201
global int w3m_backend init(FALSE);
1202
global TextLineList *backend_halfdump_buf;
1203
global TextList *backend_batch_commands init(NULL);
1205
extern void deleteFiles(void);
1206
void w3m_exit(int i);
1210
#define AL_EXPLICIT 1
1211
#define AL_IMPLICIT 2
1212
#define AL_IMPLICIT_ONCE 3
1214
typedef struct _AlarmEvent {
1229
#endif /* not FM_H */