To: vim-dev@vim.org Subject: Patch 6.0.227 (extra) Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.227 (extra) Problem: The RISC OS port has several problems. Solution: Update the makefile and fix some of the problems. (Andy Wingate) Files: src/Make_ro.mak, src/os_riscos.c, src/os_riscos.h, src/proto/os_riscos.pro, src/search.c *** ../vim60.226/src/Make_ro.mak Sun Mar 25 17:24:17 2001 --- src/Make_ro.mak Mon Feb 11 22:17:19 2002 *************** *** 1,17 **** # ! # Makefile for Vim on RiscOS - Thomas Leonard # ! CC = gcc -DRISCOS -DFEAT_GUI -O2 -x c ! OBJS = o.buffer o.charset o.diff o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2o.ex_docmd o.ex_getln o.fileio o.fold o.getchar o.if_cscope o.main o.mark o.memfile o.memline o.menu o.message o.misc1 o.misc2 o.mbyte o.normal o.ops o.option o.quickfix o.regexp o.screen o.search o.syntax o.tag o.term o.ui o.undo o.version o.window o.os_riscos o.swis o.gui all: $(OBJS) ! drlink -o Prog:!Vim.Vim $(OBJS) gcc:o.libgcc unix:o.unixlib o.swis: s.swis ! gcc -c s.swis ! # Note: I havn't put the dependencies in here since I prefer to just ! # recompile bits at a time (eg os_riscos.h is included by everyone ! # but I don't want to recompile everything when I change it). --- 1,160 ---- # ! # Makefile for Vim on RISC OS - Andy Wingate # ! GCC = gcc -mthrowback ! CFLAGS = -DRISCOS -DUSE_GUI ! # Optimising on ex_docmd.c seems to cause segfaults on compilation. Needs investigation. ! CCEX_DOCMD = $(GCC) $(CFLAGS) ! CC = $(GCC) $(CFLAGS) -O2 ! # -DUP_BC_PC_EXTERN for term.c needed as BC defined in termlib.c and term.c ! TERMFLAG = -DUP_BC_PC_EXTERN ! ! ASMFLAGS = -throwback -objasm -gcc ! ! OBJS = o.buffer o.charset o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2 o.diff \ ! o.ex_docmd o.ex_getln o.fileio o.fold o.getchar o.main o.mark o.mbyte \ ! o.memfile o.memline o.menu o.message o.misc1 o.misc2 o.move \ ! o.normal o.ops o.option o.quickfix o.regexp o.screen o.search \ ! o.syntax o.tag o.term o.termlib o.ui o.undo o.version o.window \ ! o.os_riscos o.swis o.gui o.gui_riscos all: $(OBJS) ! $(GCC) -o Vim $(OBJS) ! ! install: Vim ! squeeze -v Vim @.!Vim.Vim o.swis: s.swis ! as $(ASMFLAGS) -o o.swis s.swis ! ! # Rules for object files ! # You shouldn't need to put all this information in as all but term.c have the same ! # rule (and only then to save extra defines) but some versions of make are awkward. ! ! o.buffer: c.buffer ! $(CC) -c c.buffer -o o.buffer ! ! o.charset: c.charset ! $(CC) -c c.charset -o o.charset ! ! o.digraph: c.digraph ! $(CC) -c c.digraph -o o.digraph ! ! o.diff: c.diff ! $(CC) -c c.diff -o o.diff ! ! o.edit: c.edit ! $(CC) -c c.edit -o o.edit ! ! o.eval: c.eval ! $(CC) -c c.eval -o o.eval ! ! o.ex_cmds: c.ex_cmds ! $(CC) -c c.ex_cmds -o o.ex_cmds ! ! o.ex_cmds2: c.ex_cmds2 ! $(CC) -c c.ex_cmds2 -o o.ex_cmds2 ! ! o.ex_docmd: c.ex_docmd ! $(CCEX_DOCMD) -c c.ex_docmd -o o.ex_docmd ! ! o.ex_getln: c.ex_getln ! $(CC) -c c.ex_getln -o o.ex_getln ! ! o.fileio: c.fileio ! $(CC) -c c.fileio -o o.fileio ! ! o.fold: c.fold ! $(CC) -c c.fold -o o.fold ! ! o.getchar: c.getchar ! $(CC) -c c.getchar -o o.getchar ! ! o.gui: c.gui ! $(CC) -v -c c.gui -o o.gui ! ! o.gui_riscos: c.gui_riscos ! $(CC) -v -c c.gui_riscos -o o.gui_riscos ! ! o.main: c.main ! $(CC) -c c.main -o o.main ! ! o.mark: c.mark ! $(CC) -c c.mark -o o.mark ! ! o.mbyte: c.mbyte ! $(CC) -c c.mbyte -o o.mbyte ! ! o.memfile: c.memfile ! $(CC) -c c.memfile -o o.memfile ! ! o.memline: c.memline ! $(CC) -c c.memline -o o.memline ! ! o.menu: c.menu ! $(CC) -c c.menu -o o.menu ! ! o.message: c.message ! $(CC) -c c.message -o o.message ! ! o.misc1: c.misc1 ! $(CC) -c c.misc1 -o o.misc1 ! ! o.misc2: c.misc2 ! $(CC) -c c.misc2 -o o.misc2 ! ! o.move: c.move ! $(CC) -c c.move -o o.move ! ! o.normal: c.normal ! $(CC) -c c.normal -o o.normal ! ! o.ops: c.ops ! $(CC) -c c.ops -o o.ops ! ! o.option: c.option ! $(CC) -c c.option -o o.option ! ! o.os_riscos: c.os_riscos ! $(CC) -c c.os_riscos -o o.os_riscos ! ! o.pty: c.pty ! $(CC) -c c.pty -o p.pty ! ! o.quickfix: c.quickfix ! $(CC) -c c.quickfix -o o.quickfix ! ! o.regexp: c.regexp ! $(CC) -c c.regexp -o o.regexp ! ! o.screen: c.screen ! $(CC) -c c.screen -o o.screen ! ! o.search: c.search ! $(CC) -c c.search -o o.search ! ! o.syntax: c.syntax ! $(CC) -c c.syntax -o o.syntax ! ! o.tag: c.tag ! $(CC) -c c.tag -o o.tag ! ! o.term: c.term ! $(CC) $(TERMFLAG) -c c.term -o o.term ! ! o.termlib: c.termlib ! $(CC) -c c.termlib -o o.termlib ! ! o.ui: c.ui ! $(CC) -c c.ui -o o.ui ! ! o.undo: c.undo ! $(CC) -c c.undo -o o.undo ! ! o.version: c.version ! $(CC) -c c.version -o o.version ! o.window: c.window ! $(CC) -c c.window -o o.window *** ../vim60.226/src/os_riscos.c Sat Sep 1 19:57:05 2001 --- src/os_riscos.c Sun Feb 17 15:32:34 2002 *************** *** 635,640 **** --- 635,668 ---- return FALSE; } + #if defined(FEAT_EVAL) || defined(PROTO) + /* + * Return 1 if "name" can be executed, 0 if not. + * Return -1 if unknown. Requires which to work. + */ + int + mch_can_exe(name) + char_u *name; + { + char_u *buf; + char_u *p; + int retval; + + buf = alloc((unsigned)STRLEN(name) + 7); + if (buf == NULL) + return -1; + sprintf((char *)buf, "which %s", name); + p = get_cmd_output(buf, SHELL_SILENT); + vim_free(buf); + if (p == NULL) + return -1; + /* result can be: "name: Command not found" */ + retval = (*p != NUL && strstr((char *)p, "not found") == NULL); + vim_free(p); + return retval; + } + #endif + /* * Check what "name" is: * NODE_NORMAL: file or directory (or doesn't exist) *************** *** 653,659 **** mch_early_init() { /* Turn off all the horrible filename munging in UnixLib. */ ! __uname_control = __UNAME_NO_PROCESS; } void --- 681,687 ---- mch_early_init() { /* Turn off all the horrible filename munging in UnixLib. */ ! __riscosify_control = __RISCOSIFY_NO_PROCESS; } void *************** *** 853,859 **** * * Returns number of items added to gap. */ ! static int expand_section(gap, root, rest, flags) garray_T *gap; char_u *root; /* Non-wildcarded path to search */ --- 881,887 ---- * * Returns number of items added to gap. */ ! int expand_section(gap, root, rest, flags) garray_T *gap; char_u *root; /* Non-wildcarded path to search */ *** ../vim60.226/src/os_riscos.h Thu Jul 26 14:00:31 2001 --- src/os_riscos.h Sun Feb 17 15:32:27 2002 *************** *** 9,17 **** #include #include #include ! #include #include ! #include #include #define CASE_INSENSITIVE_FILENAME --- 9,18 ---- #include #include #include ! #include #include ! #include ! #include #include #define CASE_INSENSITIVE_FILENAME *************** *** 21,29 **** #define USE_TERM_CONSOLE #define HAVE_AVAIL_MEM ! /* 10, but 4 char margin for extension. */ #ifndef BASENAMELEN ! # define BASENAMELEN 6 #endif #ifndef TEMNAME --- 22,30 ---- #define USE_TERM_CONSOLE #define HAVE_AVAIL_MEM ! /* Longer filenames now accessible to all */ #ifndef BASENAMELEN ! # define BASENAMELEN 64 /* Same length as unzip */ #endif #ifndef TEMNAME *************** *** 45,51 **** #endif #ifndef DFLT_VDIR ! # define DFLT_VDIR "Choices:vimfiles/view" /* default for 'viewdir' */ #endif #ifndef TERMCAPFILE --- 46,52 ---- #endif #ifndef DFLT_VDIR ! # define DFLT_VDIR "Choices:Vim.vimfiles/view" /* default for 'viewdir' */ #endif #ifndef TERMCAPFILE *************** *** 57,69 **** # define SYNTAX_FNAME "Vim:Syntax.%s" #endif #define FEAT_VIMINFO #ifndef VIMINFO_FILE ! # define VIMINFO_FILE ".VimInfo" #endif #ifndef VIMINFO_FILE2 ! # define VIMINFO_FILE2 "Choices:VimInfo" #endif #ifndef VIMRC_FILE --- 58,74 ---- # define SYNTAX_FNAME "Vim:Syntax.%s" #endif + #ifndef EVIM_FILE + # define EVIM_FILE "Vim:Evim" + #endif + #define FEAT_VIMINFO #ifndef VIMINFO_FILE ! # define VIMINFO_FILE ".Vim.VimInfo" #endif #ifndef VIMINFO_FILE2 ! # define VIMINFO_FILE2 "Choices:Vim.VimInfo" #endif #ifndef VIMRC_FILE *************** *** 76,82 **** # define GVIMRC_FILE "/gvimrc" #endif #ifndef VIEW_FILE ! # define VIEW_FILE "/View.vim" #endif #ifndef USR_VIMRC_FILE # define USR_VIMRC_FILE "Vim:Evim" --- 81,87 ---- # define GVIMRC_FILE "/gvimrc" #endif #ifndef VIEW_FILE ! # define VIEW_FILE "/View" #endif #ifndef USR_VIMRC_FILE # define USR_VIMRC_FILE "Vim:Evim" *************** *** 85,97 **** # define SESSION_FILE "/Session.vim" #endif #ifndef USR_VIMRC_FILE ! # define USR_VIMRC_FILE "Choices:UserVimRC" #endif #ifndef USR_GVIMRC_FILE ! # define USR_GVIMRC_FILE "Choices:GVimRC" #endif #ifndef USR_EXRC_FILE ! # define USR_EXRC_FILE "Choices:ExRC" #endif #ifndef SYS_VIMRC_FILE # define SYS_VIMRC_FILE "Vim:VimRC" --- 90,102 ---- # define SESSION_FILE "/Session.vim" #endif #ifndef USR_VIMRC_FILE ! # define USR_VIMRC_FILE "Choices:Vim.VimRC" #endif #ifndef USR_GVIMRC_FILE ! # define USR_GVIMRC_FILE "Choices:Vim.GVimRC" #endif #ifndef USR_EXRC_FILE ! # define USR_EXRC_FILE "Choices:Vim.ExRC" #endif #ifndef SYS_VIMRC_FILE # define SYS_VIMRC_FILE "Vim:VimRC" *************** *** 106,131 **** # define SYS_OPTWIN_FILE "Vim:Optwin" #endif #ifndef FILETYPE_FILE ! # define FILETYPE_FILE "Filetype" #endif #ifndef FTPLUGIN_FILE ! # define FTPLUGIN_FILE "Ftplugin" #endif #ifndef INDENT_FILE ! # define INDENT_FILE "Indent" #endif #ifndef FTOFF_FILE ! # define FTOFF_FILE "Ftoff" #endif #ifndef FTPLUGOF_FILE ! # define FTPLUGOF_FILE "Ftplugof" #endif #ifndef INDOFF_FILE ! # define INDOFF_FILE "Indoff" #endif #define DFLT_ERRORFILE "errors/vim" ! #define DFLT_RUNTIMEPATH "Choices:vimfiles,$VIMRUNTIME,Choices:vimfiles/after" /* * RISC PCs have plenty of memory, use large buffers --- 111,136 ---- # define SYS_OPTWIN_FILE "Vim:Optwin" #endif #ifndef FILETYPE_FILE ! # define FILETYPE_FILE "Vim:Filetype" #endif #ifndef FTPLUGIN_FILE ! # define FTPLUGIN_FILE "Vim:Ftplugin/vim" #endif #ifndef INDENT_FILE ! # define INDENT_FILE "Vim:Indent/vim" #endif #ifndef FTOFF_FILE ! # define FTOFF_FILE "Vim:Ftoff" #endif #ifndef FTPLUGOF_FILE ! # define FTPLUGOF_FILE "Vim:Ftplugof" #endif #ifndef INDOFF_FILE ! # define INDOFF_FILE "Vim:Indoff" #endif #define DFLT_ERRORFILE "errors/vim" ! #define DFLT_RUNTIMEPATH "Choices:Vim.vimfiles,$VIMRUNTIME,Choices:Vim.vimfiles/after" /* * RISC PCs have plenty of memory, use large buffers *************** *** 155,161 **** int xswi(int swinum, ...); /* Returns errors using v flag */ extern int r0, r1, r2, r3, r4, r5, r6, r7; /* For return values */ ! #include #define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) #define mch_rename(src, dst) rename(src, dst) --- 160,167 ---- int xswi(int swinum, ...); /* Returns errors using v flag */ extern int r0, r1, r2, r3, r4, r5, r6, r7; /* For return values */ ! #include ! #include #define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) #define mch_rename(src, dst) rename(src, dst) *** ../vim60.226/src/proto/os_riscos.pro Tue Sep 25 21:49:36 2001 --- src/proto/os_riscos.pro Sun Feb 17 15:32:34 2002 *************** *** 2,11 **** void mch_write __ARGS((char_u *s, int len)); int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime)); int mch_char_avail __ARGS((void)); ! long_u mch_avail_mem __ARGS((int special)); void mch_delay __ARGS((long msec, int ignoreinput)); void mch_suspend __ARGS((void)); void mch_init __ARGS((void)); int mch_check_win __ARGS((int argc, char **argv)); int mch_input_isatty __ARGS((void)); int mch_can_restore_title __ARGS((void)); --- 2,16 ---- void mch_write __ARGS((char_u *s, int len)); int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime)); int mch_char_avail __ARGS((void)); ! long_u mch_total_mem __ARGS((int special)); void mch_delay __ARGS((long msec, int ignoreinput)); + int mch_stackcheck __ARGS((char *p)); + void mch_startjmp __ARGS((void)); + void mch_endjmp __ARGS((void)); + void mch_didjmp __ARGS((void)); void mch_suspend __ARGS((void)); void mch_init __ARGS((void)); + void reset_signals __ARGS((void)); int mch_check_win __ARGS((int argc, char **argv)); int mch_input_isatty __ARGS((void)); int mch_can_restore_title __ARGS((void)); *************** *** 13,31 **** --- 18,43 ---- void mch_settitle __ARGS((char_u *title, char_u *icon)); void mch_restore_title __ARGS((int which)); int mch_get_user_name __ARGS((char_u *s, int len)); + int mch_get_uname __ARGS((uid_t uid, char_u *s, int len)); void mch_get_host_name __ARGS((char_u *s, int len)); long mch_get_pid __ARGS((void)); int mch_dirname __ARGS((char_u *buf, int len)); + void slash_adjust __ARGS((char_u *p)); int mch_FullName __ARGS((char_u *fname, char_u *buf, int len, int force)); int mch_isFullName __ARGS((char_u *fname)); long mch_getperm __ARGS((char_u *name)); int mch_setperm __ARGS((char_u *name, long perm)); + vim_acl_T mch_get_acl __ARGS((char_u *fname)); + void mch_set_acl __ARGS((char_u *fname, vim_acl_T aclent)); + void mch_free_acl __ARGS((vim_acl_T aclent)); void mch_hide __ARGS((char_u *name)); int mch_isdir __ARGS((char_u *name)); + int mch_can_exe __ARGS((char_u *name)); int mch_nodetype __ARGS((char_u *name)); void mch_early_init __ARGS((void)); void mch_exit __ARGS((int r)); void mch_settmode __ARGS((int tmode)); + void get_stty __ARGS((void)); void mch_setmouse __ARGS((int on)); int mch_screenmode __ARGS((char_u *arg)); int mch_get_shellsize __ARGS((void)); *************** *** 37,42 **** --- 49,56 ---- int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); int mch_has_exp_wildcard __ARGS((char_u *p)); int mch_has_wildcard __ARGS((char_u *p)); + int mch_libcall __ARGS((char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result)); + void setup_term_clip __ARGS((void)); int mch_remove __ARGS((char_u *file)); char_u *mch_munge_fname __ARGS((char_u *fname)); int ro_buflist_add __ARGS((char_u *old_name)); *** ../vim60.226/src/search.c Thu Feb 7 11:37:45 2002 --- src/search.c Sun Feb 17 15:32:34 2002 *************** *** 3383,3389 **** char_u *already = NULL; char_u *startp = NULL; #ifdef RISCOS ! int previous_munging = __uname_control; #endif #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) win_T *curwin_save = NULL; --- 3383,3389 ---- char_u *already = NULL; char_u *startp = NULL; #ifdef RISCOS ! int previous_munging = __riscosify_control; #endif #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) win_T *curwin_save = NULL; *************** *** 3399,3405 **** #ifdef RISCOS /* UnixLib knows best how to munge c file names - turn munging back on. */ ! __uname_control = __UNAME_LONG_TRUNC; #endif if (type != CHECK_PATH && type != FIND_DEFINE --- 3399,3405 ---- #ifdef RISCOS /* UnixLib knows best how to munge c file names - turn munging back on. */ ! __riscosify_control = __RISCOSIFY_LONG_TRUNCATE; #endif if (type != CHECK_PATH && type != FIND_DEFINE *************** *** 3995,4001 **** #ifdef RISCOS /* Restore previous file munging state. */ ! __uname_control = previous_munging; #endif } --- 3995,4001 ---- #ifdef RISCOS /* Restore previous file munging state. */ ! __riscosify_control = previous_munging; #endif } *** ../vim60.226/src/version.c Sun Feb 17 13:55:07 2002 --- src/version.c Sun Feb 17 15:32:56 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 227, /**/ -- ARTHUR: CHARGE! [The mighty ARMY charges. Thundering noise of feet. Clatter of coconuts. Shouts etc. Suddenly there is a wail of a siren and a couple of police cars roar round in front of the charging ARMY and the POLICE leap out and stop them. TWO POLICEMAN and the HISTORIAN'S WIFE. Black Marias skid up behind them.] HISTORIAN'S WIFE: They're the ones, I'm sure. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///