[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Dired_support under MSDOS
From: |
Philip Webb |
Subject: |
lynx-dev Dired_support under MSDOS |
Date: |
Tue, 27 Apr 1999 14:17:13 -0400 (EDT) |
this looks as if it would be useful, if it works, but no-one commented:
did it get overlooked? TD? DK?
> From: "Igor B. Poretsky" <address@hidden>
> Date: Wed, 21 Apr 99 09:50:57 +0400
> Subject: lynx-dev Dired_support under MSDOS
> I tried to compile Lynx by DJGPP under MSDOS with dired_support enabled,
> but failed. I'd like to suggest the next patch to resolve this problem.
> This patch can be applied to the version 2.8.2dev.22. Among other things,
> I doubt that changes I made in lymainloop.c are absolutely correct.
> But without it any attempt to activate link "up to parrent directoru"
> ended by exiting Lynx with the error message
> if that parrent directory was the root directory on any local disk.
> Maybe, some of you could suggest anything better.
>
> diff -rc lynx2-8-/src/lyglobal.h
> e:/tcpip/browsers/lynx/src/lynx2-8-/src/lyglobal.h
> *** lynx2-8-/src/lyglobal.h Tue Apr 13 09:39:16 1999
> --- e:/tcpip/browsers/lynx/src/lynx2-8-/src/lyglobal.h Tue Apr 13
> 02:14:28 1999
> ***************
> *** 57,62 ****
> --- 57,63 ----
> extern BOOLEAN no_dired_support;
> extern int dir_list_style;
> extern HTList *tagged;
> + #define DIRECTORIES_FIRST 0
> #define FILES_FIRST 1
> #define MIXED_STYLE 2
> #ifdef OK_OVERRIDE
> diff -rc lynx2-8-/src/lylocal.c
> e:/tcpip/browsers/lynx/src/lynx2-8-/src/lylocal.c
> *** lynx2-8-/src/lylocal.c Tue Mar 30 17:10:36 1999
> --- e:/tcpip/browsers/lynx/src/lynx2-8-/src/lylocal.c Tue Apr 13 02:14:34 1999
> ***************
> *** 1364,1369 ****
> --- 1364,1379 ----
> that need it. Don't forget to FREE it. */
>
> tp = NULL;
> + #ifdef __MSDOS__
> + if (!strncmp(line, "LYNXDIRED://", 12)) {
> + char *s;
> + int i;
> + s = index(&line[12], '/');
> + if(s!=NULL)
> + for(i=0; s[i]!=0; i++)
> + s[i] = s[i+1];
> + }
> + #endif
> if (!strncmp(line, "LYNXDIRED://NEW_FILE", 20)) {
> if (create_file(&line[20]) > 0)
> LYforce_no_cache = TRUE;
> ***************
> *** 2049,2054 ****
> --- 2059,2077 ----
>
> rc = 1; /* It will work */
> stop_curses();
> + #ifdef __MSDOS__
> + {
> + int n;
> + char *the_command = 0;
> +
> + HTSprintf(&the_command, "%s", path);
> + for (n = 1; argv[n] != 0; n++)
> + HTSprintf(&the_command, " %s", argv[n]);
> + HTSprintf(&the_command, "\n");
> + rc = LYSystem(the_command) ? 0 : 1;
> + free(the_command);
> + }
> + #else
> pid = fork(); /* fork and execute rm */
> switch (pid) {
> case -1:
> ***************
> *** 2086,2091 ****
> --- 2109,2115 ----
> rc = 0;
> }
> }
> + #endif /* MSDOS */
>
> if (rc == 0) {
> /*
> diff -rc lynx2-8-/src/lymain.c
> e:/tcpip/browsers/lynx/src/lynx2-8-/src/lymain.c
> *** lynx2-8-/src/lymain.c Tue Apr 13 09:39:16 1999
> --- e:/tcpip/browsers/lynx/src/lynx2-8-/src/lymain.c Tue Apr 13 02:14:42 1999
> ***************
> *** 90,96 ****
> #ifdef DIRED_SUPPORT
> PUBLIC BOOLEAN lynx_edit_mode = FALSE;
> PUBLIC BOOLEAN no_dired_support = FALSE;
> ! PUBLIC int dir_list_style = MIXED_STYLE;
> PUBLIC HTList *tagged = NULL;
> #ifdef OK_OVERRIDE
> PUBLIC BOOLEAN prev_lynx_edit_mode = FALSE;
> --- 90,96 ----
> #ifdef DIRED_SUPPORT
> PUBLIC BOOLEAN lynx_edit_mode = FALSE;
> PUBLIC BOOLEAN no_dired_support = FALSE;
> ! PUBLIC int dir_list_style = DIRECTORIES_FIRST;
> PUBLIC HTList *tagged = NULL;
> #ifdef OK_OVERRIDE
> PUBLIC BOOLEAN prev_lynx_edit_mode = FALSE;
> diff -rc lynx2-8-/src/lymainlo.c
> e:/tcpip/browsers/lynx/src/lynx2-8-/src/lymainlo.c
> *** lynx2-8-/src/lymainlo.c Tue Apr 13 09:39:16 1999
> --- e:/tcpip/browsers/lynx/src/lynx2-8-/src/lymainlo.c Tue Apr 13
> 02:29:58 1999
> ***************
> *** 3471,3477 ****
> psrc_view = FALSE; /* we get here if link is not internal
> */
> #endif
>
> ! #ifdef DIRED_SUPPORT
> if (lynx_edit_mode) {
> HTuncache_current_document();
> /*
> --- 3471,3477 ----
> psrc_view = FALSE; /* we get here if link is not internal
> */
> #endif
>
> ! #if defined(DIRED_SUPPORT) && !defined(__MSDOS__)
> if (lynx_edit_mode) {
> HTuncache_current_document();
> /*
> ***************
> *** 3482,3488 ****
> HTUnEscapeSome(newdoc.address,"/");
> strip_trailing_slash(newdoc.address);
> }
> ! #endif /* DIRED_SUPPORT */
> if (!strncmp(curdoc.address, "LYNXCOOKIE:", 11)) {
> HTuncache_current_document();
> }
> --- 3482,3488 ----
> HTUnEscapeSome(newdoc.address,"/");
> strip_trailing_slash(newdoc.address);
> }
> ! #endif /* DIRED_SUPPORT and not MSDOS */
> if (!strncmp(curdoc.address, "LYNXCOOKIE:", 11)) {
> HTuncache_current_document();
> }
> diff -rc lynx2-8-/src/lyutils.c
> e:/tcpip/browsers/lynx/src/lynx2-8-/src/lyutils.c
> *** lynx2-8-/src/lyutils.c Tue Apr 13 09:39:16 1999
> --- e:/tcpip/browsers/lynx/src/lynx2-8-/src/lyutils.c Tue Apr 13 02:15:10 1999
> ***************
> *** 2051,2057 ****
> #ifdef USE_SLANG
> if (!LYCursesON)
> fd = fileno(stdin);
> ! #if SLANG_VERSION >= 9919
> /* SLang_TT_Read_FD introduced in slang 0.99.19, from its changelog:
> * SLang_TT_Read_FD variable is now available for unix. This is the
> file
> * descriptor used by SLang_getkey. */
> --- 2051,2057 ----
> #ifdef USE_SLANG
> if (!LYCursesON)
> fd = fileno(stdin);
> ! #if (defined REAL_UNIX_SYSTEM) && (SLANG_VERSION >= 9919)
> /* SLang_TT_Read_FD introduced in slang 0.99.19, from its changelog:
> * SLang_TT_Read_FD variable is now available for unix. This is the
> file
> * descriptor used by SLang_getkey. */
> Only in e:/tcpip/browsers/lynx/src/lynx2-8-: userdefs.h~
> diff -rc lynx2-8-/www/library/implemen/htdos.c
> e:/tcpip/browsers/lynx/src/lynx2-8-/www/library/implemen/htdos.c
> *** lynx2-8-/www/library/implemen/htdos.c Wed Jan 13 11:37:34 1999
> --- e:/tcpip/browsers/lynx/src/lynx2-8-/www/library/implemen/htdos.c Tue Apr
> 13 02:15:38 1999
> ***************
> *** 2,7 ****
> --- 2,8 ----
>
> */
>
> + #include <sys/stat.h>
> #include <HTUtils.h>
> #include <HTDOS.h>
>
> ***************
> *** 81,84 ****
> --- 82,91 ----
>
> CTRACE(tfp, "HTDOS_name changed `%s' to `%s'\n", wwwname, result);
> return (result);
> + }
> + /* DJGPP doesn't have `lstat', since MS-DOS doesn't
> + support links. Here's a trivial substitute that will do. */
> + int lstat (const char *fname, struct stat *st_buf)
> + {
> + return stat (fname, st_buf);
> }
--
========================,,============================================
SUPPORT ___________//___, Philip Webb : address@hidden
ELECTRIC /] [] [] [] [] []| Centre for Urban & Community Studies
TRANSIT `-O----------O---' University of Toronto