w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

proto.h (28590B)


      1 /* $Id$ */
      2 /* 
      3  *   This file was automatically generated by version 1.7 of cextract.
      4  *   Manual editing not recommended.
      5  *
      6  *   Created: Wed Feb 10 12:47:03 1999
      7  */
      8 extern int main(int argc, char **argv, char **envp);
      9 extern void nulcmd(void);
     10 extern void pushEvent(int cmd, void *data);
     11 extern MySignalHandler intTrap(SIGNAL_ARG);
     12 extern void pgFore(void);
     13 extern void pgBack(void);
     14 extern void lup1(void);
     15 extern void ldown1(void);
     16 extern void ctrCsrV(void);
     17 extern void ctrCsrH(void);
     18 extern void rdrwSc(void);
     19 extern void srchfor(void);
     20 extern void isrchfor(void);
     21 extern void srchbak(void);
     22 extern void isrchbak(void);
     23 extern void srchnxt(void);
     24 extern void srchprv(void);
     25 extern void shiftl(void);
     26 extern void shiftr(void);
     27 extern void col1R(void);
     28 extern void col1L(void);
     29 extern void setEnv(void);
     30 extern void pipeBuf(void);
     31 extern void pipesh(void);
     32 extern void readsh(void);
     33 extern void execsh(void);
     34 extern void ldfile(void);
     35 extern void ldhelp(void);
     36 extern void movL(void);
     37 extern void movL1(void);
     38 extern void movD(void);
     39 extern void movD1(void);
     40 extern void movU(void);
     41 extern void movU1(void);
     42 extern void movR(void);
     43 extern void movR1(void);
     44 extern void movLW(void);
     45 extern void movRW(void);
     46 extern void qquitfm(void);
     47 extern void quitfm(void);
     48 extern void selBuf(void);
     49 extern void susp(void);
     50 extern void goLine(void);
     51 extern void goLineF(void);
     52 extern void goLineL(void);
     53 extern void linbeg(void);
     54 extern void linend(void);
     55 extern void editBf(void);
     56 extern void editScr(void);
     57 extern void followA(void);
     58 extern void bufferA(void);
     59 extern void followI(void);
     60 extern void submitForm(void);
     61 extern void followForm(void);
     62 extern void topA(void);
     63 extern void lastA(void);
     64 extern void onA(void);
     65 
     66 extern void nextA(void);
     67 extern void prevA(void);
     68 extern void nextVA(void);
     69 extern void prevVA(void);
     70 extern void nextL(void);
     71 extern void nextLU(void);
     72 extern void nextR(void);
     73 extern void nextRD(void);
     74 extern void nextD(void);
     75 extern void nextU(void);
     76 extern void nextBf(void);
     77 extern void prevBf(void);
     78 extern void backBf(void);
     79 extern void deletePrevBuf(void);
     80 extern void goURL(void);
     81 extern void gorURL(void);
     82 extern void ldBmark(void);
     83 extern void adBmark(void);
     84 extern void ldOpt(void);
     85 extern void setOpt(void);
     86 extern void pginfo(void);
     87 extern void msgs(void);
     88 extern void svA(void);
     89 extern void svI(void);
     90 extern void svBuf(void);
     91 extern void svSrc(void);
     92 extern void peekURL(void);
     93 extern void peekIMG(void);
     94 extern void curURL(void);
     95 extern void vwSrc(void);
     96 extern void reload(void);
     97 extern void reshape(void);
     98 extern void chkURL(void);
     99 extern void chkURLBuffer(Buffer *buf);
    100 extern void chkWORD(void);
    101 #ifdef USE_NNTP
    102 extern void chkNMID(void);
    103 extern void chkNMIDBuffer(Buffer *buf);
    104 #else
    105 #define chkNMID nulcmd
    106 #endif
    107 extern void rFrame(void);
    108 extern void extbrz(void);
    109 extern void linkbrz(void);
    110 extern void curlno(void);
    111 extern void execCmd(void);
    112 #ifdef USE_IMAGE
    113 extern void dispI(void);
    114 extern void stopI(void);
    115 #else
    116 #define dispI nulcmd
    117 #define stopI nulcmd
    118 #endif
    119 #ifdef USE_ALARM
    120 extern void setAlarm(void);
    121 extern AlarmEvent *setAlarmEvent(AlarmEvent * event, int sec, short status,
    122 				 int cmd, void *data);
    123 #else
    124 #define setAlarm nulcmd
    125 #endif
    126 extern void reinit(void);
    127 extern void defKey(void);
    128 extern void newT(void);
    129 extern void closeT(void);
    130 extern void nextT(void);
    131 extern void prevT(void);
    132 extern void tabA(void);
    133 extern void tabURL(void);
    134 extern void tabrURL(void);
    135 extern void tabR(void);
    136 extern void tabL(void);
    137 extern void ldDL(void);
    138 extern void linkLst(void);
    139 #ifdef USE_MENU
    140 extern void linkMn(void);
    141 extern LinkList *link_menu(Buffer *buf);
    142 extern void accessKey(void);
    143 extern Anchor *accesskey_menu(Buffer *buf);
    144 extern void listMn(void);
    145 extern void movlistMn(void);
    146 extern Anchor *list_menu(Buffer *buf);
    147 #else
    148 #define linkMn nulcmd
    149 #define accessKey nulcmd
    150 #define listMn nulcmd
    151 #define movlistMn nulcmd
    152 #endif
    153 extern void undoPos(void);
    154 extern void redoPos(void);
    155 
    156 extern int currentLn(Buffer *buf);
    157 extern void tmpClearBuffer(Buffer *buf);
    158 extern char *filename_extension(char *patch, int is_url);
    159 #ifdef USE_EXTERNAL_URI_LOADER
    160 extern void initURIMethods();
    161 extern Str searchURIMethods(ParsedURL *pu);
    162 extern void chkExternalURIBuffer(Buffer *buf);
    163 #endif
    164 extern ParsedURL *schemeToProxy(int scheme);
    165 extern void examineFile(char *path, URLFile *uf);
    166 extern char *acceptableEncoding();
    167 extern int dir_exist(char *path);
    168 extern int is_html_type(char *type);
    169 #ifdef USE_M17N
    170 extern char **get_symbol(wc_ces charset, int *width);
    171 extern char **set_symbol(int width);
    172 extern Str convertLine(URLFile *uf, Str line, int mode, wc_ces * charset,
    173 		       wc_ces doc_charset);
    174 #else
    175 extern char **get_symbol(void);
    176 extern Str convertLine0(URLFile *uf, Str line, int mode);
    177 #define convertLine(uf,line,mode,charset,dcharset) convertLine0(uf,line,mode)
    178 #endif
    179 extern void push_symbol(Str str, char symbol, int width, int n);
    180 #ifdef USE_UNICODE
    181 extern void update_utf8_symbol(void);
    182 #endif
    183 extern Buffer *loadFile(char *path);
    184 extern Buffer *loadGeneralFile(char *path, ParsedURL *current, char *referer,
    185 			       int flag, FormList *request);
    186 extern int is_boundary(unsigned char *, unsigned char *);
    187 extern int is_blank_line(char *line, int indent);
    188 extern void push_render_image(Str str, int width, int limit,
    189 			      struct html_feed_environ *h_env);
    190 extern void flushline(struct html_feed_environ *h_env, struct readbuffer *obuf,
    191 		      int indent, int force, int width);
    192 extern void do_blankline(struct html_feed_environ *h_env,
    193 			 struct readbuffer *obuf, int indent, int indent_incr,
    194 			 int width);
    195 extern void purgeline(struct html_feed_environ *h_env);
    196 extern void save_fonteffect(struct html_feed_environ *h_env,
    197 			    struct readbuffer *obuf);
    198 extern void restore_fonteffect(struct html_feed_environ *h_env,
    199 			       struct readbuffer *obuf);
    200 #ifdef USE_IMAGE
    201 extern void deleteImage(Buffer *buf);
    202 extern void getAllImage(Buffer *buf);
    203 extern void loadImage(Buffer *buf, int flag);
    204 extern ImageCache *getImage(Image * image, ParsedURL *current, int flag);
    205 extern int getImageSize(ImageCache * cache);
    206 #endif
    207 extern Str process_img(struct parsed_tag *tag, int width);
    208 extern Str process_anchor(struct parsed_tag *tag, char *tagbuf);
    209 extern Str process_input(struct parsed_tag *tag);
    210 extern Str process_select(struct parsed_tag *tag);
    211 extern Str process_n_select(void);
    212 extern void feed_select(char *str);
    213 extern void process_option(void);
    214 extern Str process_textarea(struct parsed_tag *tag, int width);
    215 extern Str process_n_textarea(void);
    216 extern void feed_textarea(char *str);
    217 extern Str process_form(struct parsed_tag *tag);
    218 extern Str process_n_form(void);
    219 extern int getMetaRefreshParam(char *q, Str *refresh_uri);
    220 extern int HTMLtagproc1(struct parsed_tag *tag,
    221 			struct html_feed_environ *h_env);
    222 extern void HTMLlineproc2(Buffer *buf, TextLineList *tl);
    223 extern void HTMLlineproc0(char *istr, struct html_feed_environ *h_env,
    224 			  int internal);
    225 #define HTMLlineproc1(x,y) HTMLlineproc0(x,y,TRUE)
    226 extern Buffer *loadHTMLBuffer(URLFile *f, Buffer *newBuf);
    227 extern char *convert_size(clen_t size, int usefloat);
    228 extern char *convert_size2(clen_t size1, clen_t size2, int usefloat);
    229 extern void showProgress(clen_t * linelen, clen_t * trbyte);
    230 extern void init_henv(struct html_feed_environ *, struct readbuffer *,
    231 		      struct environment *, int, TextLineList *, int, int);
    232 extern void completeHTMLstream(struct html_feed_environ *,
    233 			       struct readbuffer *);
    234 extern void loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src,
    235 			   int internal);
    236 extern Buffer *loadHTMLString(Str page);
    237 #ifdef USE_GOPHER
    238 extern Str loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset);
    239 #endif				/* USE_GOPHER */
    240 extern Buffer *loadBuffer(URLFile *uf, Buffer *newBuf);
    241 #ifdef USE_IMAGE
    242 extern Buffer *loadImageBuffer(URLFile *uf, Buffer *newBuf);
    243 #endif
    244 extern void saveBuffer(Buffer *buf, FILE * f, int cont);
    245 extern void saveBufferBody(Buffer *buf, FILE * f, int cont);
    246 extern Buffer *getshell(char *cmd);
    247 extern Buffer *getpipe(char *cmd);
    248 extern Buffer *openPagerBuffer(InputStream stream, Buffer *buf);
    249 extern Buffer *openGeneralPagerBuffer(InputStream stream);
    250 extern Line *getNextPage(Buffer *buf, int plen);
    251 extern int save2tmp(URLFile uf, char *tmpf);
    252 extern int doExternal(URLFile uf, char *path, char *type, Buffer **bufp,
    253 		      Buffer *defaultbuf);
    254 extern int _doFileCopy(char *tmpf, char *defstr, int download);
    255 #define doFileCopy(tmpf, defstr) _doFileCopy(tmpf, defstr, FALSE);
    256 extern int doFileMove(char *tmpf, char *defstr);
    257 extern int doFileSave(URLFile uf, char *defstr);
    258 extern int checkCopyFile(char *path1, char *path2);
    259 extern int checkSaveFile(InputStream stream, char *path);
    260 extern int checkOverWrite(char *path);
    261 extern char *inputAnswer(char *prompt);
    262 extern int matchattr(char *p, char *attr, int len, Str *value);
    263 extern void readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu);
    264 extern char *checkHeader(Buffer *buf, char *field);
    265 extern TabBuffer *newTab(void);
    266 extern void calcTabPos(void);
    267 extern TabBuffer *deleteTab(TabBuffer * tab);
    268 extern void addDownloadList(pid_t pid, char *url, char *save, char *lock,
    269 			    clen_t size);
    270 extern void stopDownload(void);
    271 extern int checkDownloadList(void);
    272 extern void download_action(struct parsed_tagarg *arg);
    273 extern Buffer *newBuffer(int width);
    274 extern Buffer *nullBuffer(void);
    275 extern void clearBuffer(Buffer *buf);
    276 extern void discardBuffer(Buffer *buf);
    277 extern Buffer *namedBuffer(Buffer *first, char *name);
    278 extern Buffer *deleteBuffer(Buffer *first, Buffer *delbuf);
    279 extern Buffer *replaceBuffer(Buffer *first, Buffer *delbuf, Buffer *newbuf);
    280 extern Buffer *nthBuffer(Buffer *firstbuf, int n);
    281 extern void gotoRealLine(Buffer *buf, int n);
    282 extern void gotoLine(Buffer *buf, int n);
    283 extern Buffer *selectBuffer(Buffer *firstbuf, Buffer *currentbuf,
    284 			    char *selectchar);
    285 extern void reshapeBuffer(Buffer *buf);
    286 extern void copyBuffer(Buffer *a, Buffer *b);
    287 extern Buffer *prevBuffer(Buffer *first, Buffer *buf);
    288 extern int writeBufferCache(Buffer *buf);
    289 extern int readBufferCache(Buffer *buf);
    290 extern void fmTerm(void);
    291 extern void fmInit(void);
    292 extern void displayBuffer(Buffer *buf, int mode);
    293 extern void addChar(char c, Lineprop mode);
    294 #ifdef USE_M17N
    295 extern void addMChar(char *c, Lineprop mode, size_t len);
    296 #endif
    297 extern void record_err_message(char *s);
    298 extern Buffer *message_list_panel(void);
    299 extern void message(char *s, int return_x, int return_y);
    300 extern void disp_err_message(char *s, int redraw_current);
    301 extern void disp_message_nsec(char *s, int redraw_current, int sec, int purge,
    302 			      int mouse);
    303 extern void disp_message(char *s, int redraw_current);
    304 #ifdef USE_MOUSE
    305 extern void disp_message_nomouse(char *s, int redraw_current);
    306 #else
    307 #define disp_message_nomouse disp_message
    308 #endif
    309 extern void set_delayed_message(char *s);
    310 extern void cursorUp0(Buffer *buf, int n);
    311 extern void cursorUp(Buffer *buf, int n);
    312 extern void cursorDown0(Buffer *buf, int n);
    313 extern void cursorDown(Buffer *buf, int n);
    314 extern void cursorUpDown(Buffer *buf, int n);
    315 extern void cursorRight(Buffer *buf, int n);
    316 extern void cursorLeft(Buffer *buf, int n);
    317 extern void cursorHome(Buffer *buf);
    318 extern void arrangeCursor(Buffer *buf);
    319 extern void arrangeLine(Buffer *buf);
    320 extern void cursorXY(Buffer *buf, int x, int y);
    321 extern void restorePosition(Buffer *buf, Buffer *orig);
    322 extern int columnSkip(Buffer *buf, int offset);
    323 extern int columnPos(Line *line, int column);
    324 extern int columnLen(Line *line, int column);
    325 extern Line *lineSkip(Buffer *buf, Line *line, int offset, int last);
    326 extern Line *currentLineSkip(Buffer *buf, Line *line, int offset, int last);
    327 extern int gethtmlcmd(char **s);
    328 #ifndef USE_ANSI_COLOR
    329 #define checkType(a,b,c) _checkType(a,b)
    330 #endif
    331 extern Str checkType(Str s, Lineprop **oprop, Linecolor **ocolor);
    332 extern int calcPosition(char *l, Lineprop *pr, int len, int pos, int bpos,
    333 			int mode);
    334 extern char *lastFileName(char *path);
    335 extern char *mybasename(char *s);
    336 extern char *mydirname(char *s);
    337 extern int next_status(char c, int *status);
    338 extern int read_token(Str buf, char **instr, int *status, int pre, int append);
    339 extern Str correct_irrtag(int status);
    340 #ifdef USE_MIGEMO
    341 extern void init_migemo(void);
    342 #endif
    343 #ifdef USE_M17N
    344 extern char *conv_search_string(char *str, wc_ces f_ces);
    345 #else
    346 #define conv_search_string(str, f_ces)	str
    347 #endif
    348 extern int forwardSearch(Buffer *buf, char *str);
    349 extern int backwardSearch(Buffer *buf, char *str);
    350 extern void pcmap(void);
    351 extern void escmap(void);
    352 extern void escbmap(void);
    353 extern void escdmap(char c);
    354 extern void multimap(void);
    355 extern char *inputLineHistSearch(char *prompt, char *def_str, int flag,
    356 				 Hist *hist, int (*incfunc) (int ch, Str buf,
    357 							     Lineprop *prop));
    358 extern Str unescape_spaces(Str s);
    359 #ifdef USE_HISTORY
    360 extern Buffer *historyBuffer(Hist *hist);
    361 extern void loadHistory(Hist *hist);
    362 extern void saveHistory(Hist *hist, size_t size);
    363 extern void ldHist(void);
    364 #else				/* not USE_HISTORY */
    365 #define ldHist nulcmd
    366 #endif				/* not USE_HISTORY */
    367 extern double log_like(int x);
    368 extern struct table *newTable(void);
    369 extern void pushdata(struct table *t, int row, int col, char *data);
    370 extern int visible_length(char *str);
    371 extern void align(TextLine *lbuf, int width, int mode);
    372 extern void print_item(struct table *t, int row, int col, int width, Str buf);
    373 extern void print_sep(struct table *t, int row, int type, int maxcol, Str buf);
    374 extern void do_refill(struct table *tbl, int row, int col, int maxlimit);
    375 extern void renderTable(struct table *t, int max_width,
    376 			struct html_feed_environ *h_env);
    377 extern struct table *begin_table(int border, int spacing, int padding,
    378 				 int vspace);
    379 extern void end_table(struct table *tbl);
    380 extern void check_rowcol(struct table *tbl, struct table_mode *mode);
    381 extern int minimum_length(char *line);
    382 extern int feed_table(struct table *tbl, char *line, struct table_mode *mode,
    383 		      int width, int internal);
    384 extern void feed_table1(struct table *tbl, Str tok, struct table_mode *mode,
    385 			int width);
    386 extern void pushTable(struct table *, struct table *);
    387 extern struct form_list *newFormList(char *action, char *method, char *charset,
    388 				     char *enctype, char *target, char *name,
    389 				     struct form_list *_next);
    390 extern struct form_item_list *formList_addInput(struct form_list *fl,
    391 						struct parsed_tag *tag);
    392 extern char *form2str(FormItemList *fi);
    393 extern int formtype(char *typestr);
    394 extern void formRecheckRadio(Anchor *a, Buffer *buf, FormItemList *form);
    395 extern void formResetBuffer(Buffer *buf, AnchorList *formitem);
    396 extern void formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form);
    397 extern void preFormUpdateBuffer(Buffer *buf);
    398 extern Str textfieldrep(Str s, int width);
    399 extern void input_textarea(FormItemList *fi);
    400 extern void do_internal(char *action, char *data);
    401 extern void form_write_data(FILE * f, char *boundary, char *name, char *value);
    402 extern void form_write_from_file(FILE * f, char *boundary, char *name,
    403 				 char *filename, char *file);
    404 extern MapList *searchMapList(Buffer *buf, char *name);
    405 extern void follow_map(struct parsed_tagarg *arg);
    406 #if defined(MENU_MAP) || defined(USE_IMAGE)
    407 extern MapArea *follow_map_menu(Buffer *buf, char *name, Anchor *a_img, int x,
    408 				int y);
    409 #endif
    410 #ifndef MENU_MAP
    411 extern Buffer *follow_map_panel(Buffer *buf, char *name);
    412 #endif
    413 #ifdef USE_IMAGE
    414 extern int getMapXY(Buffer *buf, Anchor *a, int *x, int *y);
    415 extern MapArea *retrieveCurrentMapArea(Buffer *buf);
    416 #endif
    417 extern Anchor *retrieveCurrentMap(Buffer *buf);
    418 extern MapArea *newMapArea(char *url, char *target, char *alt, char *shape,
    419 			   char *coords);
    420 extern Buffer *page_info_panel(Buffer *buf);
    421 extern struct frame_body *newFrame(struct parsed_tag *tag, Buffer *buf);
    422 extern struct frameset *newFrameSet(struct parsed_tag *tag);
    423 extern void addFrameSetElement(struct frameset *f,
    424 			       union frameset_element element);
    425 extern void deleteFrame(struct frame_body *b);
    426 extern void deleteFrameSet(struct frameset *f);
    427 extern void deleteFrameSetElement(union frameset_element e);
    428 extern struct frameset *copyFrameSet(struct frameset *of);
    429 extern void pushFrameTree(struct frameset_queue **fqpp, struct frameset *fs,
    430 			  Buffer *buf);
    431 extern struct frameset *popFrameTree(struct frameset_queue **fqpp);
    432 extern void resetFrameElement(union frameset_element *f_element, Buffer *buf,
    433 			      char *referer, FormList *request);
    434 extern Buffer *renderFrame(Buffer *Cbuf, int force_reload);
    435 extern union frameset_element *search_frame(struct frameset *fset, char *name);
    436 extern int set_tty(void);
    437 extern void set_cc(int spec, int val);
    438 extern void close_tty(void);
    439 extern char *ttyname_tty(void);
    440 extern void reset_tty(void);
    441 extern MySignalHandler reset_exit(SIGNAL_ARG);
    442 extern MySignalHandler error_dump(SIGNAL_ARG);
    443 extern void set_int(void);
    444 extern void getTCstr(void);
    445 extern void setlinescols(void);
    446 extern void setupscreen(void);
    447 extern pid_t open_pipe_rw(FILE ** fr, FILE ** fw);
    448 extern int initscr(void);
    449 extern void move(int line, int column);
    450 #ifdef USE_M17N
    451 extern void addmch(char *p, size_t len);
    452 #endif
    453 extern void addch(char c);
    454 extern void wrap(void);
    455 extern void touch_line(void);
    456 extern void standout(void);
    457 extern void standend(void);
    458 extern void bold(void);
    459 extern void boldend(void);
    460 extern void underline(void);
    461 extern void underlineend(void);
    462 extern void graphstart(void);
    463 extern void graphend(void);
    464 extern int graph_ok(void);
    465 #ifdef USE_COLOR
    466 extern void setfcolor(int color);
    467 #ifdef USE_BG_COLOR
    468 extern void setbcolor(int color);
    469 #endif				/* USE_BG_COLOR */
    470 #endif				/* USE_COLOR */
    471 extern void refresh(void);
    472 extern void clear(void);
    473 #ifdef USE_RAW_SCROLL
    474 extern void scroll(int);
    475 extern void rscroll(int);
    476 #endif
    477 #if 0
    478 extern void need_clrtoeol(void);
    479 #endif
    480 extern void clrtoeol(void);
    481 extern void clrtoeolx(void);
    482 extern void clrtobot(void);
    483 extern void clrtobotx(void);
    484 extern void no_clrtoeol(void);
    485 extern void addstr(char *s);
    486 extern void addnstr(char *s, int n);
    487 extern void addnstr_sup(char *s, int n);
    488 extern void crmode(void);
    489 extern void nocrmode(void);
    490 extern void term_echo(void);
    491 extern void term_noecho(void);
    492 extern void term_raw(void);
    493 extern void term_cooked(void);
    494 extern void term_cbreak(void);
    495 extern void term_title(char *s);
    496 extern void flush_tty(void);
    497 extern void toggle_stand(void);
    498 extern char getch(void);
    499 extern void bell(void);
    500 extern int sleep_till_anykey(int sec, int purge);
    501 #ifdef USE_IMAGE
    502 extern void touch_cursor();
    503 #endif
    504 extern void initMimeTypes();
    505 extern void free_ssl_ctx();
    506 extern ParsedURL *baseURL(Buffer *buf);
    507 extern int openSocket(char *hostname, char *remoteport_name,
    508 		      unsigned short remoteport_num);
    509 extern void parseURL(char *url, ParsedURL *p_url, ParsedURL *current);
    510 extern void copyParsedURL(ParsedURL *p, ParsedURL *q);
    511 extern void parseURL2(char *url, ParsedURL *pu, ParsedURL *current);
    512 extern Str parsedURL2Str(ParsedURL *pu);
    513 extern int getURLScheme(char **url);
    514 extern void init_stream(URLFile *uf, int scheme, InputStream stream);
    515 Str HTTPrequestMethod(HRequest *hr);
    516 Str HTTPrequestURI(ParsedURL *pu, HRequest *hr);
    517 extern URLFile openURL(char *url, ParsedURL *pu, ParsedURL *current,
    518 		       URLOption *option, FormList *request,
    519 		       TextList *extra_header, URLFile *ouf,
    520 		       HRequest *hr, unsigned char *status);
    521 extern int mailcapMatch(struct mailcap *mcap, char *type);
    522 extern struct mailcap *searchMailcap(struct mailcap *table, char *type);
    523 extern void initMailcap();
    524 extern char *acceptableMimeTypes();
    525 extern struct mailcap *searchExtViewer(char *type);
    526 extern Str unquote_mailcap(char *qstr, char *type, char *name, char *attr,
    527 			   int *mc_stat);
    528 extern char *guessContentType(char *filename);
    529 extern TextList *make_domain_list(char *domain_list);
    530 extern int check_no_proxy(char *domain);
    531 extern InputStream openFTPStream(ParsedURL *pu, URLFile *uf);
    532 #ifdef USE_M17N
    533 extern Str loadFTPDir(ParsedURL *pu, wc_ces * charset);
    534 #else
    535 extern Str loadFTPDir0(ParsedURL *pu);
    536 #define loadFTPDir(pu,charset)	loadFTPDir0(pu)
    537 #endif
    538 extern void closeFTP(void);
    539 extern void disconnectFTP(void);
    540 #ifdef USE_NNTP
    541 extern InputStream openNewsStream(ParsedURL *pu);
    542 #ifdef USE_M17N
    543 extern Str loadNewsgroup(ParsedURL *pu, wc_ces * charset);
    544 #else
    545 extern Str loadNewsgroup0(ParsedURL *pu);
    546 #define loadNewsgroup(pu,charset) loadNewsgroup0(pu)
    547 #endif
    548 extern void closeNews(void);
    549 extern void disconnectNews(void);
    550 #endif
    551 extern AnchorList *putAnchor(AnchorList *al, char *url, char *target,
    552 			     Anchor **anchor_return, char *referer,
    553 			     char *title, unsigned char key, int line,
    554 			     int pos);
    555 extern Anchor *registerHref(Buffer *buf, char *url, char *target,
    556 			    char *referer, char *title, unsigned char key,
    557 			    int line, int pos);
    558 extern Anchor *registerName(Buffer *buf, char *url, int line, int pos);
    559 extern Anchor *registerImg(Buffer *buf, char *url, char *title, int line,
    560 			   int pos);
    561 extern Anchor *registerForm(Buffer *buf, FormList *flist,
    562 			    struct parsed_tag *tag, int line, int pos);
    563 extern int onAnchor(Anchor *a, int line, int pos);
    564 extern Anchor *retrieveAnchor(AnchorList *al, int line, int pos);
    565 extern Anchor *retrieveCurrentAnchor(Buffer *buf);
    566 extern Anchor *retrieveCurrentImg(Buffer *buf);
    567 extern Anchor *retrieveCurrentForm(Buffer *buf);
    568 extern Anchor *searchAnchor(AnchorList *al, char *str);
    569 extern Anchor *searchURLLabel(Buffer *buf, char *url);
    570 extern void reAnchorWord(Buffer *buf, Line *l, int spos, int epos);
    571 extern char *reAnchor(Buffer *buf, char *re);
    572 #ifdef USE_NNTP
    573 extern char *reAnchorNews(Buffer *buf, char *re);
    574 extern char *reAnchorNewsheader(Buffer *buf);
    575 #endif				/* USE_NNTP */
    576 extern void addMultirowsForm(Buffer *buf, AnchorList *al);
    577 extern Anchor *closest_next_anchor(AnchorList *a, Anchor *an, int x, int y);
    578 extern Anchor *closest_prev_anchor(AnchorList *a, Anchor *an, int x, int y);
    579 #ifdef USE_IMAGE
    580 void addMultirowsImg(Buffer *buf, AnchorList *al);
    581 #endif
    582 extern HmarkerList *putHmarker(HmarkerList *ml, int line, int pos, int seq);
    583 extern void shiftAnchorPosition(AnchorList *a, HmarkerList *hl, int line,
    584 				int pos, int shift);
    585 extern char *getAnchorText(Buffer *buf, AnchorList *al, Anchor *a);
    586 extern Buffer *link_list_panel(Buffer *buf);
    587 
    588 extern Str decodeB(char **ww);
    589 extern Str decodeQ(char **ww);
    590 extern Str decodeQP(char **ww);
    591 extern Str decodeU(char **ww);
    592 #ifdef USE_M17N
    593 extern Str decodeWord(char **ow, wc_ces * charset);
    594 extern Str decodeMIME(Str orgstr, wc_ces * charset);
    595 #else
    596 extern Str decodeWord0(char **ow);
    597 extern Str decodeMIME0(Str orgstr);
    598 #define decodeWord(ow,charset) decodeWord0(ow)
    599 #define decodeMIME(orgstr,charset) decodeMIME0(orgstr)
    600 #endif
    601 extern Str encodeB(char *a);
    602 extern int set_param_option(char *option);
    603 extern char *get_param_option(char *name);
    604 extern void init_rc(void);
    605 extern Buffer *load_option_panel(void);
    606 extern void panel_set_option(struct parsed_tagarg *);
    607 extern void sync_with_option(void);
    608 extern char *rcFile(char *base);
    609 extern char *etcFile(char *base);
    610 extern char *confFile(char *base);
    611 extern char *auxbinFile(char *base);
    612 extern char *libFile(char *base);
    613 extern char *helpFile(char *base);
    614 extern Str localCookie(void);
    615 extern Str loadLocalDir(char *dirname);
    616 extern void set_environ(char *var, char *value);
    617 extern FILE *localcgi_post(char *, char *, FormList *, char *);
    618 #define localcgi_get(u, q, r) localcgi_post((u), (q), NULL, (r))
    619 extern FILE *openSecretFile(char *fname);
    620 extern void loadPasswd(void);
    621 extern void loadPreForm(void);
    622 extern int find_auth_user_passwd(ParsedURL *pu, char *realm,
    623 				 Str *uname, Str *pwd, int is_proxy);
    624 extern void add_auth_user_passwd(ParsedURL *pu, char *realm,
    625 				 Str uname, Str pwd, int is_proxy);
    626 extern void invalidate_auth_user_passwd(ParsedURL *pu, char *realm,
    627 					Str uname, Str pwd, int is_proxy);
    628 extern char *last_modified(Buffer *buf);
    629 extern Str romanNumeral(int n);
    630 extern Str romanAlphabet(int n);
    631 extern void setup_child(int child, int i, int f);
    632 extern void myExec(char *command);
    633 extern void mySystem(char *command, int background);
    634 extern Str myExtCommand(char *cmd, char *arg, int redirect);
    635 extern Str myEditor(char *cmd, char *file, int line);
    636 extern char *file_to_url(char *file);
    637 #ifdef USE_M17N
    638 extern char *url_unquote_conv(char *url, wc_ces charset);
    639 #else
    640 extern char *url_unquote_conv0(char *url);
    641 #define url_unquote_conv(url, charset) url_unquote_conv0(url)
    642 #endif
    643 extern char *expandName(char *name);
    644 extern Str tmpfname(int type, char *ext);
    645 extern time_t mymktime(char *timestr);
    646 extern void (*mySignal(int signal_number, void (*action) (int))) (int);
    647 #ifdef USE_COOKIE
    648 extern char *FQDN(char *host);
    649 extern Str find_cookie(ParsedURL *pu);
    650 extern int add_cookie(ParsedURL *pu, Str name, Str value, time_t expires,
    651 		      Str domain, Str path, int flag, Str comment, int version,
    652 		      Str port, Str commentURL);
    653 extern void save_cookies(void);
    654 extern void load_cookies(void);
    655 extern void initCookie(void);
    656 extern void cooLst(void);
    657 extern Buffer *cookie_list_panel(void);
    658 extern void set_cookie_flag(struct parsed_tagarg *arg);
    659 extern int check_cookie_accept_domain(char *domain);
    660 #else				/* not USE_COOKIE */
    661 #define cooLst nulcmd
    662 #endif				/* not USE_COOKIE */
    663 #ifdef USE_M17N
    664 extern void docCSet(void);
    665 extern void defCSet(void);
    666 extern void change_charset(struct parsed_tagarg *arg);
    667 #else
    668 #define docCSet nulcmd
    669 #define defCSet nulcmd
    670 #endif
    671 
    672 #ifdef USE_MARK
    673 extern void _mark(void);
    674 extern void nextMk(void);
    675 extern void prevMk(void);
    676 extern void reMark(void);
    677 #else				/* not USE_MARK */
    678 #define _mark  nulcmd
    679 #define nextMk nulcmd
    680 #define prevMk nulcmd
    681 #define reMark nulcmd
    682 #endif				/* not USE_MARK */
    683 
    684 #ifdef USE_MOUSE
    685 extern void mouse(void);
    686 extern void mouse_init(void);
    687 extern void mouse_end(void);
    688 extern void mouse_active(void);
    689 extern void mouse_inactive(void);
    690 extern void msToggle(void);
    691 extern void movMs(void);
    692 #ifdef USE_MENU
    693 extern void menuMs(void);
    694 #else
    695 #define menuMs nulcmd
    696 #endif
    697 extern void tabMs(void);
    698 extern void closeTMs(void);
    699 #else				/* not USE_MOUSE */
    700 #define mouse nulcmd
    701 #define msToggle nulcmd
    702 #define movMs nulcmd
    703 #define menuMs nulcmd
    704 #define tabMs nulcmd
    705 #define closeTMs nulcmd
    706 #endif				/* not USE_MOUSE */
    707 
    708 #ifdef USE_IMAGE
    709 extern void initImage(void);
    710 extern void termImage(void);
    711 extern void addImage(ImageCache * cache, int x, int y, int sx, int sy, int w,
    712 		     int h);
    713 extern void drawImage(void);
    714 extern void clearImage(void);
    715 #endif
    716 
    717 extern char *searchKeyData(void);
    718 
    719 extern void setKeymap(char *p, int lineno, int verbose);
    720 extern void initKeymap(int force);
    721 extern int getFuncList(char *id);
    722 extern int getKey(char *s);
    723 extern char *getKeyData(int key);
    724 extern char *getWord(char **str);
    725 extern char *getQWord(char **str);
    726 #ifdef USE_MOUSE
    727 extern void initMouseAction(void);
    728 #endif
    729 
    730 #ifdef USE_MENU
    731 extern void new_menu(Menu *menu, MenuItem *item);
    732 extern void geom_menu(Menu *menu, int x, int y, int mselect);
    733 extern void draw_all_menu(Menu *menu);
    734 extern void draw_menu(Menu *menu);
    735 extern void draw_menu_item(Menu *menu, int mselect);
    736 extern int select_menu(Menu *menu, int mselect);
    737 extern void goto_menu(Menu *menu, int mselect, int down);
    738 extern void up_menu(Menu *menu, int n);
    739 extern void down_menu(Menu *menu, int n);
    740 extern int action_menu(Menu *menu);
    741 extern void popup_menu(Menu *parent, Menu *menu);
    742 extern void guess_menu_xy(Menu *menu, int width, int *x, int *y);
    743 extern void new_option_menu(Menu *menu, char **label, int *variable,
    744 			    void (*func) ());
    745 
    746 extern int setMenuItem(MenuItem *item, char *type, char *line);
    747 extern int addMenuList(MenuList **list, char *id);
    748 extern int getMenuN(MenuList *list, char *id);
    749 
    750 extern void popupMenu(int x, int y, Menu *menu);
    751 extern void mainMenu(int x, int y);
    752 extern void mainMn(void);
    753 extern void selMn(void);
    754 extern void tabMn(void);
    755 extern void optionMenu(int x, int y, char **label, int *variable, int initial,
    756 		       void (*func) ());
    757 extern void initMenu(void);
    758 #else				/* not USE_MENU */
    759 #define mainMn nulcmd
    760 #define selMn selBuf
    761 #define tabMn nulcmd
    762 #endif				/* not USE_MENU */
    763 
    764 #ifdef USE_DICT
    765 extern void dictword(void);
    766 extern void dictwordat(void);
    767 #else				/* not USE_DICT */
    768 #define dictword nulcmd
    769 #define dictwordat nulcmd
    770 #endif				/* not USE_DICT */
    771 #if 0
    772 extern void reloadBuffer(Buffer *buf);
    773 #endif
    774 extern char *guess_save_name(Buffer *buf, char *file);
    775 
    776 extern void wrapToggle(void);
    777 #ifdef USE_BUFINFO
    778 extern void saveBufferInfo(void);
    779 #endif
    780 
    781 extern Str getLinkNumberStr(int correction);
    782 
    783 extern void dispVer(void);
    784 
    785 #ifdef USE_INCLUDED_SRAND48
    786 void srand48(long);
    787 long lrand48(void);
    788 #endif
    789 
    790 #include "indep.h"