head 1.8; access; symbols pkgsrc-2026Q1:1.8.0.88 pkgsrc-2026Q1-base:1.8 pkgsrc-2025Q4:1.8.0.86 pkgsrc-2025Q4-base:1.8 pkgsrc-2025Q3:1.8.0.84 pkgsrc-2025Q3-base:1.8 pkgsrc-2025Q2:1.8.0.82 pkgsrc-2025Q2-base:1.8 pkgsrc-2025Q1:1.8.0.80 pkgsrc-2025Q1-base:1.8 pkgsrc-2024Q4:1.8.0.78 pkgsrc-2024Q4-base:1.8 pkgsrc-2024Q3:1.8.0.76 pkgsrc-2024Q3-base:1.8 pkgsrc-2024Q2:1.8.0.74 pkgsrc-2024Q2-base:1.8 pkgsrc-2024Q1:1.8.0.72 pkgsrc-2024Q1-base:1.8 pkgsrc-2023Q4:1.8.0.70 pkgsrc-2023Q4-base:1.8 pkgsrc-2023Q3:1.8.0.68 pkgsrc-2023Q3-base:1.8 pkgsrc-2023Q2:1.8.0.66 pkgsrc-2023Q2-base:1.8 pkgsrc-2023Q1:1.8.0.64 pkgsrc-2023Q1-base:1.8 pkgsrc-2022Q4:1.8.0.62 pkgsrc-2022Q4-base:1.8 pkgsrc-2022Q3:1.8.0.60 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.58 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.56 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.54 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.8.0.52 pkgsrc-2021Q3-base:1.8 pkgsrc-2021Q2:1.8.0.50 pkgsrc-2021Q2-base:1.8 pkgsrc-2021Q1:1.8.0.48 pkgsrc-2021Q1-base:1.8 pkgsrc-2020Q4:1.8.0.46 pkgsrc-2020Q4-base:1.8 pkgsrc-2020Q3:1.8.0.44 pkgsrc-2020Q3-base:1.8 pkgsrc-2020Q2:1.8.0.40 pkgsrc-2020Q2-base:1.8 pkgsrc-2020Q1:1.8.0.20 pkgsrc-2020Q1-base:1.8 pkgsrc-2019Q4:1.8.0.42 pkgsrc-2019Q4-base:1.8 pkgsrc-2019Q3:1.8.0.38 pkgsrc-2019Q3-base:1.8 pkgsrc-2019Q2:1.8.0.36 pkgsrc-2019Q2-base:1.8 pkgsrc-2019Q1:1.8.0.34 pkgsrc-2019Q1-base:1.8 pkgsrc-2018Q4:1.8.0.32 pkgsrc-2018Q4-base:1.8 pkgsrc-2018Q3:1.8.0.30 pkgsrc-2018Q3-base:1.8 pkgsrc-2018Q2:1.8.0.28 pkgsrc-2018Q2-base:1.8 pkgsrc-2018Q1:1.8.0.26 pkgsrc-2018Q1-base:1.8 pkgsrc-2017Q4:1.8.0.24 pkgsrc-2017Q4-base:1.8 pkgsrc-2017Q3:1.8.0.22 pkgsrc-2017Q3-base:1.8 pkgsrc-2017Q2:1.8.0.18 pkgsrc-2017Q2-base:1.8 pkgsrc-2017Q1:1.8.0.16 pkgsrc-2017Q1-base:1.8 pkgsrc-2016Q4:1.8.0.14 pkgsrc-2016Q4-base:1.8 pkgsrc-2016Q3:1.8.0.12 pkgsrc-2016Q3-base:1.8 pkgsrc-2016Q2:1.8.0.10 pkgsrc-2016Q2-base:1.8 pkgsrc-2016Q1:1.8.0.8 pkgsrc-2016Q1-base:1.8 pkgsrc-2015Q4:1.8.0.6 pkgsrc-2015Q4-base:1.8 pkgsrc-2015Q3:1.8.0.4 pkgsrc-2015Q3-base:1.8 pkgsrc-2015Q2:1.8.0.2 pkgsrc-2015Q2-base:1.8 pkgsrc-2015Q1:1.7.0.40 pkgsrc-2015Q1-base:1.7 pkgsrc-2014Q4:1.7.0.38 pkgsrc-2014Q4-base:1.7 pkgsrc-2014Q3:1.7.0.36 pkgsrc-2014Q3-base:1.7 pkgsrc-2014Q2:1.7.0.34 pkgsrc-2014Q2-base:1.7 pkgsrc-2014Q1:1.7.0.32 pkgsrc-2014Q1-base:1.7 pkgsrc-2013Q4:1.7.0.30 pkgsrc-2013Q4-base:1.7 pkgsrc-2013Q3:1.7.0.28 pkgsrc-2013Q3-base:1.7 pkgsrc-2013Q2:1.7.0.26 pkgsrc-2013Q2-base:1.7 pkgsrc-2013Q1:1.7.0.24 pkgsrc-2013Q1-base:1.7 pkgsrc-2012Q4:1.7.0.22 pkgsrc-2012Q4-base:1.7 pkgsrc-2012Q3:1.7.0.20 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.18 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.16 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.14 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.12 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.7.0.10 pkgsrc-2011Q2-base:1.7 TNF:1.1.1 pkgsrc-2011Q1:1.7.0.8 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q4:1.7.0.6 pkgsrc-2010Q4-base:1.7 pkgsrc-2010Q3:1.7.0.4 pkgsrc-2010Q3-base:1.7 pkgsrc-2010Q2:1.7.0.2 pkgsrc-2010Q2-base:1.7 pkgsrc-2009Q4:1.6.0.42 pkgsrc-2009Q4-base:1.6 pkgsrc-2008Q4:1.6.0.40 pkgsrc-2008Q4-base:1.6 pkgsrc-2008Q3:1.6.0.38 pkgsrc-2008Q3-base:1.6 cube-native-xorg:1.6.0.36 cube-native-xorg-base:1.6 pkgsrc-2008Q2:1.6.0.34 pkgsrc-2008Q2-base:1.6 pkgsrc-2008Q1:1.6.0.32 pkgsrc-2008Q1-base:1.6 pkgsrc-2007Q4:1.6.0.30 pkgsrc-2007Q4-base:1.6 pkgsrc-2007Q3:1.6.0.28 pkgsrc-2007Q3-base:1.6 pkgsrc-2007Q2:1.6.0.26 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.24 pkgsrc-2007Q1-base:1.6 pkgsrc-2006Q4:1.6.0.22 pkgsrc-2006Q4-base:1.6 pkgsrc-2006Q3:1.6.0.20 pkgsrc-2006Q3-base:1.6 pkgsrc-2006Q2:1.6.0.18 pkgsrc-2006Q2-base:1.6 pkgsrc-2006Q1:1.6.0.16 pkgsrc-2006Q1-base:1.6 pkgsrc-2005Q4:1.6.0.14 pkgsrc-2005Q4-base:1.6 pkgsrc-2005Q3:1.6.0.12 pkgsrc-2005Q3-base:1.6 pkgsrc-2005Q2:1.6.0.10 pkgsrc-2005Q2-base:1.6 pkgsrc-2005Q1:1.6.0.8 pkgsrc-2005Q1-base:1.6 pkgsrc-2004Q4:1.6.0.6 pkgsrc-2004Q4-base:1.6 pkgsrc-2004Q3:1.6.0.4 pkgsrc-2004Q3-base:1.6 pkgsrc-2004Q2:1.6.0.2 pkgsrc-2004Q2-base:1.6 pkgsrc-2004Q1:1.5.0.4 pkgsrc-2004Q1-base:1.5 pkgsrc-2003Q4:1.5.0.2 pkgsrc-2003Q4-base:1.5 netbsd-1-6-1:1.4.0.6 netbsd-1-6-1-base:1.4 netbsd-1-6:1.4.0.8 netbsd-1-6-RELEASE-base:1.4 pkgviews:1.4.0.4 pkgviews-base:1.4 buildlink2:1.4.0.2 buildlink2-base:1.4 netbsd-1-5-PATCH003:1.4 netbsd-1-5-PATCH001:1.2 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.2 comdex-fall-1999:1.2 netbsd-1-4-PATCH001:1.2 netbsd-1-4-RELEASE:1.2 netbsd-1-3-PATCH003:1.2 netbsd-1-3-PATCH002:1.1.1.1 freebsd-currentish:1.1.1.1; locks; strict; comment @# @; 1.8 date 2015.05.03.01.45.33; author wen; state Exp; branches; next 1.7; commitid 6g3O35OGK6KllWjy; 1.7 date 2010.06.23.12.52.43; author adam; state Exp; branches; next 1.6; 1.6 date 2004.06.03.08.52.23; author adam; state dead; branches; next 1.5; 1.5 date 2003.04.27.17.45.31; author cjep; state Exp; branches; next 1.4; 1.4 date 2001.05.22.12.23.28; author wiz; state Exp; branches; next 1.3; 1.3 date 2001.05.22.11.37.16; author wiz; state Exp; branches; next 1.2; 1.2 date 98.08.07.10.40.32; author agc; state Exp; branches; next 1.1; 1.1 date 97.10.29.19.48.28; author explorer; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 97.10.29.19.48.28; author explorer; state Exp; branches; next ; desc @@ 1.8 log @Update to 4.0 Upstream changes: JOE 4.0 JOE now has pop-up shell windows with full terminal emulation and shell commands that can control the editor. Hit F1 - F4 to bring up a shell window. See Pop-up shell feature for a full description. The status command (^K SPACE) can now be customized using the same syntax as the status bar. Look for smsg and zmsg in joerc to see how to do this. parserr (the error parser) will parse only the highlighted block if it's set. Before it always parsed the entire buffer. Now there is a per-buffer concept of current directory. This was added to make the pop-up shell windows work better, but it's useful in general. At file prompts you can begin a new anchored path without having to delete the old one. It means that ~jhallen/foo//etc/passwd is translated to /etc/passwd. Prompt windows are now highighted to indicate which parts of the path are being dropped. There is a syntax file for this: filename.jsf The error parser now ignores ANSI sequences (some versions of grep color their results, now JOE can still parse it). Temporary messages are now dismissed by keyboard input only. Before, they could also be dismissed by shell input. Tags search now supports multiple matches. ^K ; can be configured to either provide a menu of the matches or to cycle through them. Tags search will now match on the member name part of member functions ('fred' will match 'myclass::fred'). Tags search will prepend the path to the tags file file name in the tags file. This is important when JOE finds the tags file via the TAGS environment variable. Remove ` as quote character from incremental search. Clean up documentation, convert much of it to Markdown. JOE 3.8 Search JOE image for :include files referenced by the joerc file. Include ftyperc file in the JOE image. Change default indent from 2 to 4. Add quick menu to change to common indent values: ^T = (1, 2, 4, or 8). Switch to + and - for definitively setting or clearing options so that 0 and 1 can be use for quick select. Added option to suppress DEADJOE file Jump to matching delimiter (Ctrl-G) has been improved. It can now use the syntax files to parse the document in order to identify strings and comments which should be skipped during the matching delimiter search. (patch by Charles Tabony). When 'notite' mode is enabled, JOE now emits linefeeds to preserve the screen contents in the terminal emulator's scrollback buffer. This can be suppressed with a new flag: nolinefeeds. JOE now starts up quiet (prints no extra messages when starting). Messages are collected in a startup log (view with ESC x showlog). There is a new flag 'noexmsg' which, when set, makes JOE quiet when it shuts down (suppresses "File not changed so no update needed" message). Use 80th column if terminal has xn capability (patch by pts and Egmont Koblinger). Support italic text (on some terminal emulators) with "\l" (patch by Egmont Koblinger) Support bracketed paste (patch by Egmont Koblinger) Fix line number in syntax highlighter error output Prevent infinite loops caused by buggy syntax definitions. New and improved syntax definitions for: Ant: contributed by Christian Nicolai Batch files: contributed by John Jordan C#: contributed by John Jordan Debian apt sources.list: contributed by Christian Nicolai Elixir: contributed by Andrew Lisin Erlang: contributed by Christian Nicolai, Jonas Rosling, Andrew Lisin git-commit messages: contributed by Christian Nicolai Go: contributed by Matthias S. Benkmann HAML: contributed by Christian Nicolai INI: contributed by Christian Nicolai iptables: contributed by Christian Nicolai Javascript: contributed by Rebecca Turner, Christian Nicolai json: contributed by Rebecca Turner Markdown: contributed by Christian Nicolai, Jonas Rosling Powershell: contributed by Oskar Liljeblad Prolog: contributed by Christian Nicolai Puppet: contributed by Christian Nicolai, Eric Eisenhart Sieve: contributed by Christian Nicolai YAML: contributed by Christian Nicolai (from github.com/cmur2/joe-syntax) Syntax definition fixes for: C, Python, Java, Lua, sh, Ruby, PHP, TeX, CSS, and XML Save/restore utf-8 and crlf modes when changing in/out of hex edit for better display Fix autocomplete for paths containing spaces Accept mouse events beyond column 208 (patch by Egmont Kobligner) Adjust guess_indent behavior based on user feedback Fix infinite loop in search and replace Add a new command 'timer' which executes a macro every n seconds. I use this for periodically injecting a command into a shell window for overnight testing of some device. Convert double to long long (if we have it) when printing hexadecimal. Fix bug where undo was acting strangly in shell windows. Fix crash when hitting -----------.. wordwrap bug. Check for math functions Use joerc if fancyjoerc not there. fix segfault from -orphan fix window size detection bug: can't take out types.h from tty.c update status line immediately on resize. va_copy fix. don't smartbackspace when smartbacks is off. @ text @$NetBSD$ --- rc/Makefile.in.orig 2015-05-03 09:22:39.000000000 +0000 +++ rc/Makefile.in @@@@ -286,16 +286,16 @@@@ install-sysconf_joeDATA: $(sysconf_joe_D @@$(NORMAL_INSTALL) @@list='$(sysconf_joe_DATA)'; test -n "$(sysconf_joedir)" || list=; \ if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(sysconf_joedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(sysconf_joedir)" || exit 1; \ + echo " $(MKDIR_P) '$(DESTDIR)$(datarootdir)/examples/joe'"; \ + $(MKDIR_P) "$(DESTDIR)$(datarootdir)/examples/joe" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconf_joedir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconf_joedir)" || exit $$?; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(datarootdir)/examples/joe'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(datarootdir)/examples/joe" || exit $$?; \ done uninstall-sysconf_joeDATA: @ 1.7 log @Changes 3.7: * backspace/DEL means 'n' in replace prompt for better emacs compatibility * Menus are now made up of macros instead of options. * ^T is now a user definable menu system * Treat \ as a quote character for file I/O. Now you can edit files like !test with \!test * Print NULs in default search string. Handle many \s properly. * Allow backslashes in file names * Fix %A to print unicode * Charles Tabony's (vectorshifts's) highlighter stack patch * ! is relace all in replace prompt * Turn off UTF-8 when we enter hex mode * Call ttsig on vfile I/O errors. * Abort cleanly when malloc returns NULL * Add reload command to reload file from disk * Modify configure scrips to use docdir for extra documents and * Don't use bold yellow, it's bad for white screens * Fix TeX highlighter: don't highlight " * Make mail.jsf more forgiving for those of us who still use old UNIX mail * Fix file rename bugs * Improve ubop: can reformat a block of paragraphs again. Reformat of adjacent indented paragraphs working again. * Improve XML highlighter: allow \r in whitespace @ text @d3 1 a3 1 --- rc/Makefile.in.orig 2010-06-23 09:05:54.000000000 +0000 d5 1 a5 3 @@@@ -196,12 +196,12 @@@@ $(ACLOCAL_M4): @@MAINTAINER_MODE_TRUE@@ $( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-sysconf_joeDATA: $(sysconf_joe_DATA) d7 8 a14 3 - test -z "$(sysconf_joedir)" || $(MKDIR_P) "$(DESTDIR)$(sysconf_joedir)" + $(MKDIR_P) "$(DESTDIR)$(datarootdir)/examples/joe" @@list='$(sysconf_joe_DATA)'; for p in $$list; do \ d16 7 a22 5 f=$(am__strip_dir) \ - echo " $(sysconf_joeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconf_joedir)/$$f'"; \ - $(sysconf_joeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconf_joedir)/$$f"; \ + echo " $(sysconf_joeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datarootdir)/examples/joe/$$f'"; \ + $(sysconf_joeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datarootdir)/examples/joe/$$f"; \ @ 1.6 log @Changes 3.1: * Regex and incremental search (jmacs ^S) now work for UTF-8 * More and improved syntax highlighting files, including Mason * Use ^T E to set character set of file (hit at the prompt for a list of available character sets). * Can install custom "i18n" style byte oriented character set definition files. * No longer depends on iconv() (easier to compile) * Fix bug where right arrow was not doing right thing on last line * Fix UTF-8 codes between 0x10000 - 0x1FFFF * Now prints for unicode control characters * Improved smart home, indent, etc. * TAB completion is now more "bash"-like * When multiple files are given on command line, they end up in same order on the screen in JOE (before they were shuffled). * Menu size is now variable (40% of window size or smaller if it's not filled). * Added -icase option for case insensitive search by default. * Added -wrap option, which makes searches wrap * Added status line sequence %x: shows current context (function name if you're editing C). * Added tab completion at search prompts and ESC-Enter for tab completion within text windows. * Warn if file changed on save. * Added Ctrl-space block selection method * Added Ctrl-arrow key block selection method * ^K E asks if you want to load original version of the file * jmacs bugs fixes: upperase word, transpose words, ^X ^C is more emacs-like., ^X k and ^X ^V more like emacs. * Much improved compile system ^[ c * Much improved jpico * aspell support. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.5 2003/04/27 17:45:31 cjep Exp $ d3 16 a18 9 --- b.c.orig 1995-01-20 08:38:25.000000000 +0000 +++ b.c @@@@ -21,6 +21,9 @@@@ JOE; see the file COPYING. If not, writ #include #endif #include +#include +#include +#include d20 1 a20 100 #include "config.h" #include "blocks.h" @@@@ -201,6 +204,7 @@@@ long amnt, nlines; if(prop) b->o=prop->o; else b->o=pdefault; mset(b->marks,0,sizeof(b->marks)); + b->filehandle = -1; /* initialize filehandle &&& ob */ b->rdonly=0; b->orphan=0; b->oldcur=0; @@@@ -255,6 +259,10 @@@@ B *b; { if(b && !--b->count) { + if (b->filehandle != -1) { + /* close filehandle, free lock &&& ob */ + close (b->filehandle); + } if(b->changed) abrerr(b->name); if(b==errbuf) errbuf=0; if(b->undo) undorm(b->undo); @@@@ -1671,7 +1679,8 @@@@ char *s; B *b; long skip,amnt; char *n; - int nowrite=0; + struct stat sb; + int nowrite=0,fh=-1; if(!s || !s[0]) { @@@@ -1704,6 +1713,28 @@@@ char *s; else fclose(fi); fi=fopen(n,"r"); if(!fi) nowrite=0; +/*printf ("nowrite open=%i\n", nowrite); */ + + /* check file mod, if no write flags set, + joe in read only mode. &&& ob */ + + if (!nowrite) { + nowrite = (!stat (n, &sb)) && (!(sb.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))); + } +/*printf ("nowrite stat=%i\n", nowrite); */ + + /* lock the file if writable, or go into read only mode if + already locked, */ + + if ((fi) && (!nowrite)) { + fh = dup( fileno(fi) ); + nowrite = (flock (fh, LOCK_EX | LOCK_NB)); + } +/*printf ("nowrite flock=%i\n", nowrite); */ + +/*nowrite = 1; */ /* for test purpose */ +/*printf ("nowrite=%i\n", nowrite); */ + } joesep(n); @@@@ -1761,6 +1792,7 @@@@ char *s; vsrm(n); b->er=error; + if( fh != -1 ) b->filehandle = fh; return b; } @@@@ -1928,7 +1960,7 @@@@ long size; if(s[0]=='!') pclose(f); else #endif - if(zcmp(s,"-")) fclose(f); + if(zcmp(s,"-")) { if (fclose(f)) return error = -5; } else fflush(f); opnerr:; @@@@ -1988,9 +2020,20 @@@@ extern char *ctime(); void ttsig(sig) { - long tim=time(0); + time_t tim=time(0); B *b; - FILE *f=fopen("DEADJOE","a"); + FILE *f; + struct stat sb; + if ((lstat("DEADJOE", &sb) == 0) && (((sb.st_mode & S_IFLNK) && (sb.st_uid != getuid())) || (sb.st_nlink > 1))) + { + printf("*** JOE was aborted "); + if (sig) printf("by signal %d, cannot save DEADJOE due to unsafe symlink\n",sig); + else printf("because the terminal closed, cannot save DEADJOE due to unsafe symlink\n"); + if(sig) ttclsn(); + _exit(1); + } + f=fopen("DEADJOE","a"); + chmod("DEADJOE", S_IRUSR | S_IWUSR); fprintf(f,"\n*** Modified files in JOE when it aborted on %s",ctime(&tim)); if(sig) fprintf(f,"*** JOE was aborted by signal %d\n",sig); else fprintf(f,"*** JOE was aborted because the terminal closed\n"); @ 1.5 log @Use time_t rather than guess int or long. Fixes build on NetBSD/shark et al. @ text @d1 1 a1 1 $NetBSD$ @ 1.4 log @Add one patch from OpenBSD to not use ./.joerc, and two from FreeBSD, one against a symlink attack on 'DEADJOE', and one to use vi-style file locking. Bump version to 2.8nb1. @ text @d3 1 a3 1 --- b.c.orig Fri Jan 20 09:38:25 1995 d5 1 a5 1 @@@@ -21,6 +21,9 @@@@ d15 1 a15 1 @@@@ -201,6 +204,7 @@@@ d23 1 a23 1 @@@@ -255,6 +259,10 @@@@ d34 1 a34 1 @@@@ -1671,7 +1679,8 @@@@ d44 1 a44 1 @@@@ -1704,6 +1713,28 @@@@ d73 1 a73 1 @@@@ -1761,6 +1792,7 @@@@ d81 1 a81 1 @@@@ -1928,7 +1960,7 @@@@ d90 3 a92 1 @@@@ -1990,7 +2022,18 @@@@ d94 2 a95 1 long tim=time(0); @ 1.3 log @Standardize patches (no functional change) @ text @d5 77 a81 1 @@@@ -1928,7 +1928,7 @@@@ d90 20 @ 1.2 log @Add NetBSD RCS Ids. @ text @d3 11 a13 63 *** main.c.old Sun Jan 22 03:21:08 1995 --- main.c Tue Oct 15 16:54:32 1996 *************** *** 18,23 **** --- 18,27 ---- #include #include + #if defined(__FreeBSD__) || defined(__NetBSD__) + #include + #include + #endif #include "config.h" #include "w.h" #include "tty.h" *************** *** 186,191 **** --- 190,209 ---- #else run=namprt(argv[0]); #endif + + #if defined(__FreeBSD__) || defined(__NetBSD__) + setlocale(LC_ALL, ""); + for(c=0;c<256;c++) + { int a=0; + if(iscntrl(c)) + a|=UNDERLINE; + if((c&0x80)&&!isprint(c)) + a|=INVERSE; + xlata[c]=a; + if(isprint(c)) + xlatc[c]=c; + } + #endif if(s=getenv("LINES")) sscanf(s,"%d",&lines); if(s=getenv("COLUMNS")) sscanf(s,"%d",&columns); *** scrn.h.old Thu Oct 6 10:09:04 1994 --- scrn.h Tue Oct 15 16:42:29 1996 *************** *** 254,263 **** #define xlat(a,c) \ ( \ ! (dspasis && ((unsigned)(c)>=128)) ? \ ((a)=0) \ : \ ! (((a)=xlata[(unsigned)(c)]), ((c)=xlatc[(unsigned)(c)])) \ ) /* int eraeol(SCRN *t,int x,int y); --- 254,263 ---- #define xlat(a,c) \ ( \ ! (dspasis && ((unsigned char)(c)>=128)) ? \ ((a)=0) \ : \ ! (((a)=xlata[(unsigned char)(c)]), ((c)=xlatc[(unsigned char)(c)])) \ ) /* int eraeol(SCRN *t,int x,int y); @ 1.1 log @Initial revision @ text @d1 2 @ 1.1.1.1 log @Import FreeBSD port of the "joe" text editor. @ text @@