Disable the following warnings; the code doesn't cope with it:
-Wno-pointer-sign
-Wno-unused-parameter
--Wno-missing-field-initializers
-Wno-old-style-definition -Wno-strict-prototypes
-Wno-cast-qual
-Wno-missing-prototypes -Wno-missing-declarations
- Search, incremental search, and search & replace all operate as usual.
___________________________________________________________________
-$MirOS: contrib/code/jupp/HINTS,v 1.10 2017/01/11 22:04:31 tg Exp $
+$MirOS: contrib/code/jupp/HINTS,v 1.11 2017/12/02 18:50:01 tg Exp $
#!/bin/mksh
-# $MirOS: contrib/code/jupp/Make-w32.sh,v 1.14 2017/01/11 21:23:52 tg Exp $
+# $MirOS: contrib/code/jupp/Make-w32.sh,v 1.18 2017/12/02 18:53:37 tg Exp $
usage() {
print -ru2 "Usage: $0 [-bCgn]"
extrawarnings="-Wall -Wextra"
(( debug )) && extrawarnings="$extrawarnings -g3"
extrawarnings="$extrawarnings -Wno-unused-parameter"
-echo "N: gcc-3.4.4-999 does not support -Wno-missing-field-initializers"
-echo "N: expect warnings about those, they are known, do not report them"
extrawarnings="$extrawarnings -Wno-old-style-definition -Wno-strict-prototypes"
extrawarnings="$extrawarnings -Wno-cast-qual"
extrawarnings="$extrawarnings -Wno-missing-prototypes -Wno-missing-declarations"
if (( contb )); then
[[ -s mkw32/build/Makefile ]]
else
- rm -rf mkw32
+ rm -rf mkw32 JWIN31$jWIN.*
mkdir mkw32{,/{build,$jtop}}
fi
+date >>JWIN31$jWIN.log
cd mkw32/build
export CFLAGS='-Os -march=i486 -mtune=pentium-mmx'
export CPPFLAGS='-DJUPPRC_BUILTIN_NAME=\"jupp32rc\"'
--prefix=c:/windows/system32 \
--sysconfdir=c:/windows/system32 \
--disable-dependency-tracking \
- --disable-curses \
- --disable-termcap \
+ --disable-terminfo \
--disable-search-libs \
--disable-getpwnam \
--disable-termidx \
- --enable-win32reloc
-make AM_CFLAGS="$extrawarnings"
+ --enable-win32reloc | tee -a ../../JWIN31$jWIN.log
+make AM_CFLAGS="$extrawarnings" | tee -a ../../JWIN31$jWIN.log
if (( nopkg )); then
ln -f joe.exe jupp.exe
ln -sf ../../jupprc .
cd ..
zip -D -X -9 -k ../JWIN31$jWIN.ZIP $jtop/*
cd ..
-ls -l JWIN31$jWIN.ZIP
+ls -l JWIN31$jWIN.*
(( nocln )) || rm -rf mkw32
-# $MirOS: contrib/code/jupp/Makefile.bsd-wrapper,v 1.11 2017/12/02 04:33:47 tg Exp $
+# $MirOS: contrib/code/jupp/Makefile.bsd-wrapper,v 1.12 2017/12/02 18:50:01 tg Exp $
#-
# make -f Makefile.bsd-wrapper CFPREFIX=/usr/mpkg sysconfjoesubdir=/joe
.ifdef __CRAZY
COPTS+= -Wno-unused-parameter \
- -Wno-missing-field-initializers \
-Wno-old-style-definition -Wno-strict-prototypes \
-Wno-cast-qual \
-Wno-missing-prototypes -Wno-missing-declarations
ESC $ insert math result money formatted
ESC m Memorandum
ESC s isearch fwrd (supposed to be Sincerely)
-ESC c compile (supposed to be center line)
+ESC c compile (supposed to be center line) — actually ^OC but ncih…
^Q U align paragraph (don't know what this does)
^Q ^Q repeat next command once every second
^Q O spell check entered word
• replace all int with size_t where applicable
• merge syntax handling code from joe-3.7+
• merge math from joe-3.7+
-• add group support to regex code
• make -Wcast-qual clean
• write a jupp(1) mdoc page
• use mirkev (better code for hashtables)
• perhaps wrap at U+00AD?
• put all configuration files into /usr/share; use XDG dirs for
overriding (HOME, maybe site?)
-• rc.c: struct glopts.set (int*) violates the strict aliasing
- rule as it’s treated as (unsigned char *) for type 2 (global
- option string), consider a union instead (check local types!)
• plug memory leaks (Valgrind reports a few)
• …
__________________________________________________________________
-$MirOS: contrib/code/jupp/TODO,v 1.40 2017/08/09 01:15:24 tg Exp $
+$MirOS: contrib/code/jupp/TODO,v 1.42 2017/12/02 18:33:24 tg Exp $
#!/bin/mksh
-# $MirOS: contrib/code/jupp/autogen.sh,v 1.14 2012/06/07 23:38:16 tg Exp $
+# $MirOS: contrib/code/jupp/autogen.sh,v 1.15 2017/12/02 17:13:33 tg Exp $
#-
-# Copyright © 2004, 2005, 2006, 2008
-# Thorsten “mirabilos” Glaser <tg@mirbsd.org>
+# Copyright © 2004, 2005, 2006, 2008, 2017
+# mirabilos <m@mirbsd.org>
#
# Provided that these terms and disclaimer and all copyright notices
# are retained or reproduced in an accompanying document, permission
else
(( rv = rv ? rv : 1 ))
fi
-rm -rf autom4te.cache
+rm -rf autom4te.cache *~
find . -type l -print0 | xargs -0 rm
exit $rv
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/b.c,v 1.18 2017/12/02 04:32:37 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/b.c,v 1.19 2017/12/02 18:50:02 tg Exp $");
#include <unistd.h>
#include <sys/stat.h>
}
-static H nhdrs = { {&nhdrs, &nhdrs} };
-static H ohdrs = { {&ohdrs, &ohdrs} };
+static H nhdrs = { {&nhdrs, &nhdrs}, 0, 0, 0, 0 };
+static H ohdrs = { {&ohdrs, &ohdrs}, 0, 0, 0, 0 };
/* Header allocation */
static H *halloc(void)
}
-static P frptrs = { {&frptrs, &frptrs} };
+static P frptrs = { {&frptrs, &frptrs}, NULL, 0, 0, NULL, 0, 0, 0, 0, 0, 0, NULL };
/* Pointer allocation */
static P *palloc(void)
}
/* Doubly linked list of buffers and free buffer structures */
-static B bufs = { {&bufs, &bufs} };
-static B frebufs = { {&frebufs, &frebufs} };
+static B bufs = { {&bufs, &bufs}, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, { NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0 }, NULL, NULL, 0, 0, 0, 0, 0, 0 };
+static B frebufs = { {&frebufs, &frebufs}, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, { NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0 }, NULL, NULL, 0, 0, 0, 0, 0, 0 };
B *bnext(void)
{
#define _JOE_B_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/b.h,v 1.5 2017/12/02 02:07:23 tg Exp $");
+__IDSTRING(rcsid_b_h, "$MirOS: contrib/code/jupp/b.h,v 1.6 2017/12/02 17:00:47 tg Exp $");
#endif
/* 31744 */
#define _JOE_BLOCKS_H 1
#ifdef EXTERN_B_C
-__RCSID("$MirOS: contrib/code/jupp/blocks.h,v 1.5 2017/12/02 02:07:23 tg Exp $");
+__IDSTRING(rcsid_blocks_h, "$MirOS: contrib/code/jupp/blocks.h,v 1.6 2017/12/02 17:00:48 tg Exp $");
#endif
/* char *mmove(char *d,char *s,int sz); Copy 'sz' bytes from 's' to 'd'.
#ifdef EXTERN_RC_C
-__RCSID("$MirOS: contrib/code/jupp/builtin.h,v 1.3 2017/12/02 02:07:23 tg Exp $");
+__IDSTRING(rcsid_builtin_h, "$MirOS: contrib/code/jupp/builtin.h,v 1.4 2017/12/02 17:00:48 tg Exp $");
#endif
/* Support for built-in config files */
#define _JOE_BW_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/bw.h,v 1.5 2017/12/02 02:07:24 tg Exp $");
+__IDSTRING(rcsid_bw_h, "$MirOS: contrib/code/jupp/bw.h,v 1.6 2017/12/02 17:00:48 tg Exp $");
#endif
extern int dspasis;
#define _Icharmap 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/charmap.h,v 1.8 2017/12/02 04:32:39 tg Exp $");
+__IDSTRING(rcsid_charmap_h, "$MirOS: contrib/code/jupp/charmap.h,v 1.9 2017/12/02 17:00:48 tg Exp $");
#endif
/* For sorted from_map entries */
#define _JOE_CMD_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/cmd.h,v 1.5 2017/12/02 02:07:25 tg Exp $");
+__IDSTRING(rcsid_cmd_h, "$MirOS: contrib/code/jupp/cmd.h,v 1.6 2017/12/02 17:00:48 tg Exp $");
#endif
extern CMD cmds[]; /* Built-in commands */
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/compat.c,v 1.8 2017/12/02 04:32:39 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/compat.c,v 1.9 2017/12/02 17:00:53 tg Exp $");
#include <limits.h>
#include <string.h>
#define L_strlcpy
#endif
#if defined(L_strlcat) || defined(L_strlcpy)
+#undef __RCSID
+#define __RCSID(x) __IDSTRING(rcsid_strlfun_inc,x)
#define OUTSIDE_OF_LIBKERN
#include "strlfun.inc"
#endif
#endif /* ndef HAVE_CTIME */
#ifndef HAVE_POPEN
+#undef __RCSID
+#define __RCSID(x) __IDSTRING(rcsid_popen_inc,x)
#include "popen.inc"
#endif
#endif
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/config.h,v 1.9 2017/12/02 02:07:26 tg Exp $");
+__IDSTRING(rcsid_config_h, "$MirOS: contrib/code/jupp/config.h,v 1.10 2017/12/02 17:00:48 tg Exp $");
#endif
#endif /* ifndef _JOE_CONFIG_H */
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61-MirPorts-2 for joe 3.1jupp31.
+# Generated by GNU Autoconf 2.61-MirPorts-2 for joe 3.1jupp31dev.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='joe'
PACKAGE_TARNAME='joe'
-PACKAGE_VERSION='3.1jupp31'
-PACKAGE_STRING='joe 3.1jupp31'
+PACKAGE_VERSION='3.1jupp31dev'
+PACKAGE_STRING='joe 3.1jupp31dev'
PACKAGE_BUGREPORT=''
ac_unique_file="b.c"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures joe 3.1jupp31 to adapt to many kinds of systems.
+\`configure' configures joe 3.1jupp31dev to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of joe 3.1jupp31:";;
+ short | recursive ) echo "Configuration of joe 3.1jupp31dev:";;
esac
cat <<\_ACEOF
--enable-dependency-tracking do not reject slow dependency extractors
--disable-curses disable use of curses library
--disable-termcap disable use of termcap library
+ --disable-terminfo disable use of terminfo functions
--disable-search-libs do not search in any external libraries
--disable-getpwnam disable use of getpwnam function
--disable-termidx do not build the termidx binary
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-joe configure 3.1jupp31
+joe configure 3.1jupp31dev
generated by GNU Autoconf 2.61-MirPorts-2
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by joe $as_me 3.1jupp31, which was
+It was created by joe $as_me 3.1jupp31dev, which was
generated by GNU Autoconf 2.61-MirPorts-2. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='joe'
- VERSION='3.1jupp31'
+ VERSION='3.1jupp31dev'
cat >>confdefs.h <<_ACEOF
fi
test x"$curses" = x"yes" && \
- search_libs_term="$search_libs_term tinfo ncurses curses"
+ search_libs_term="$search_libs_term tinfo ncursesw ncurses curses"
# Check whether --enable-termcap was given.
if test "${enable_termcap+set}" = set; then
test x"$termcap" = x"yes" && \
search_libs_term="$search_libs_term termcap"
+# Check whether --enable-terminfo was given.
+if test "${enable_terminfo+set}" = set; then
+ enableval=$enable_terminfo; terminfo=$enableval
+else
+ terminfo=yes
+fi
+
+
# Check whether --enable-search_libs was given.
if test "${enable_search_libs+set}" = set; then
enableval=$enable_search_libs; search_libs=$enableval
fi
-{ echo "$as_me:$LINENO: checking for library containing tgetflag" >&5
+if test x"$terminfo" = x"no"; then
+ echo "DISabling looking for terminal libraries entirely!"
+else
+ { echo "$as_me:$LINENO: checking for library containing tgetflag" >&5
echo $ECHO_N "checking for library containing tgetflag... $ECHO_C" >&6; }
if test "${ac_cv_search_tgetflag+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
+fi
{ echo "$as_me:$LINENO: checking for library containing snprintf" >&5
echo $ECHO_N "checking for library containing snprintf... $ECHO_C" >&6; }
if test "${ac_cv_search_snprintf+set}" = set; then
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by joe $as_me 3.1jupp31, which was
+This file was extended by joe $as_me 3.1jupp31dev, which was
generated by GNU Autoconf 2.61-MirPorts-2. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-joe config.status 3.1jupp31
+joe config.status 3.1jupp31dev
configured by $0, generated by GNU Autoconf 2.61-MirPorts-2,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-# $MirOS: contrib/code/jupp/configure.ac,v 1.59 2017/12/02 04:15:29 tg Exp $
+# $MirOS: contrib/code/jupp/configure.ac,v 1.61 2017/12/02 05:26:39 tg Exp $
#-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.54)
#### Here's the only place where to change version number ####
-AC_INIT(joe, 3.1jupp31)
+AC_INIT(joe, 3.1jupp31dev)
#### But see main.c for the Copyright (c) owner and year! ####
AC_CONFIG_SRCDIR([b.c])
[ --disable-curses disable use of curses library],
curses=$enableval, curses=yes)
test x"$curses" = x"yes" && \
- search_libs_term="$search_libs_term tinfo ncurses curses"
+ search_libs_term="$search_libs_term tinfo ncursesw ncurses curses"
AC_ARG_ENABLE(termcap,
[ --disable-termcap disable use of termcap library],
test x"$termcap" = x"yes" && \
search_libs_term="$search_libs_term termcap"
+AC_ARG_ENABLE(terminfo,
+[ --disable-terminfo disable use of terminfo functions],
+ terminfo=$enableval, terminfo=yes)
+
AC_ARG_ENABLE([search_libs],
[ --disable-search-libs do not search in any external libraries],
search_libs=$enableval, search_libs=yes)
AC_SEARCH_LIBS(openpty, $search_libs_util, AC_DEFINE_UNQUOTED(HAVE_OPENPTY, 1, [If we have BSD function openpty()]))
AC_SEARCH_LIBS(login_tty, $search_libs_util, AC_DEFINE_UNQUOTED(HAVE_LOGIN_TTY, 1, [If we have BSD function login_tty()]))
-AC_SEARCH_LIBS(tgetflag, $search_libs_term, AC_DEFINE_UNQUOTED(TERMINFO, 1, [If we have newer terminfo/termcap capabilities]))
+if test x"$terminfo" = x"no"; then
+ echo "DISabling looking for terminal libraries entirely!"
+else
+ AC_SEARCH_LIBS(tgetflag, $search_libs_term, AC_DEFINE_UNQUOTED(TERMINFO, 1, [If we have newer terminfo/termcap capabilities]))
+fi
AC_SEARCH_LIBS(snprintf, $search_libs_snprintf, AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [If we have snprintf]))
AC_SEARCH_LIBS(is_selinux_enabled, $search_libs_selinux, AC_DEFINE_UNQUOTED(HAVE_SELINUX_FUN, 1, [We have SELinux functions]))
#define _JOE_HASH_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/hash.h,v 1.3 2017/12/02 02:07:26 tg Exp $");
+__IDSTRING(rcsid_hash_h, "$MirOS: contrib/code/jupp/hash.h,v 1.4 2017/12/02 17:00:48 tg Exp $");
#endif
unsigned long hash PARAMS((unsigned char *s));
#define _JOE_HELP_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/help.h,v 1.5 2017/12/02 02:07:26 tg Exp $");
+__IDSTRING(rcsid_help_h, "$MirOS: contrib/code/jupp/help.h,v 1.6 2017/12/02 17:00:48 tg Exp $");
#endif
extern struct help *help_actual;
#include <stdlib.h>
#endif
-__RCSID("$MirOS: contrib/code/jupp/i18n.c,v 1.26 2017/12/02 04:32:39 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/i18n.c,v 1.27 2017/12/02 18:50:02 tg Exp $");
#include "charmap.h"
.ifdef __CRAZY
COPTS+= -Wno-unused-parameter \
- -Wno-missing-field-initializers \
-Wno-old-style-definition -Wno-strict-prototypes \
-Wno-cast-qual \
-Wno-missing-prototypes -Wno-missing-declarations
#define _Ii18n 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/i18n.h,v 1.9 2017/12/02 02:07:28 tg Exp $");
+__IDSTRING(rcsid_i18n_h, "$MirOS: contrib/code/jupp/i18n.h,v 1.10 2017/12/02 17:00:48 tg Exp $");
#endif
#ifdef TEST_I18N
#define _JOE_KBD_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/kbd.h,v 1.3 2017/12/02 02:07:28 tg Exp $");
+__IDSTRING(rcsid_kbd_h, "$MirOS: contrib/code/jupp/kbd.h,v 1.4 2017/12/02 17:00:49 tg Exp $");
#endif
/* KMAP *mkkmap(void);
#define _JOE_MACRO_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/macro.h,v 1.3 2017/12/02 02:07:28 tg Exp $");
+__IDSTRING(rcsid_macro_h, "$MirOS: contrib/code/jupp/macro.h,v 1.4 2017/12/02 17:00:49 tg Exp $");
#endif
/* Set when macro is recording: for status line */
#define _JOE_MAIN_H 1
#ifdef EXTERN_B_C
-__RCSID("$MirOS: contrib/code/jupp/main.h,v 1.4 2017/12/02 02:07:29 tg Exp $");
+__IDSTRING(rcsid_main_h, "$MirOS: contrib/code/jupp/main.h,v 1.5 2017/12/02 17:00:49 tg Exp $");
#endif
extern const char null[];
#define _JOE_MENU_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/menu.h,v 1.3 2017/12/02 02:07:29 tg Exp $");
+__IDSTRING(rcsid_menu_h, "$MirOS: contrib/code/jupp/menu.h,v 1.4 2017/12/02 17:00:49 tg Exp $");
#endif
/* Create a menu */
#define _JOE_PATH_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/path.h,v 1.12 2017/12/02 02:07:29 tg Exp $");
+__IDSTRING(rcsid_path_h, "$MirOS: contrib/code/jupp/path.h,v 1.13 2017/12/02 17:00:49 tg Exp $");
#endif
#if defined(__MSDOS__) || defined(__DJGPP__) || defined(__EMX__) || \
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/poshist.c,v 1.3 2017/12/02 02:07:29 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/poshist.c,v 1.4 2017/12/02 18:50:03 tg Exp $");
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
W *w;
};
-POS pos = { {&pos, &pos} };
-POS frpos = { {&frpos, &frpos} };
+POS pos = { {&pos, &pos}, NULL, NULL };
+POS frpos = { {&frpos, &frpos}, NULL, NULL };
POS *curpos = &pos;
int npos = 0;
#define _JOE_POSHIST_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/poshist.h,v 1.3 2017/12/02 02:07:29 tg Exp $");
+__IDSTRING(rcsid_poshist_h, "$MirOS: contrib/code/jupp/poshist.h,v 1.4 2017/12/02 17:00:49 tg Exp $");
#endif
void afterpos PARAMS((void));
#define _JOE_PW_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/pw.h,v 1.5 2017/12/02 02:07:30 tg Exp $");
+__IDSTRING(rcsid_pw_h, "$MirOS: contrib/code/jupp/pw.h,v 1.6 2017/12/02 17:00:49 tg Exp $");
#endif
/* BW *wmkpw(BW *bw,char *prompt,int (*func)(),char *huh,int (*abrt)(),
#define _JOE_QUEUE 1
#ifdef EXTERN_B_C
-__RCSID("$MirOS: contrib/code/jupp/queue.h,v 1.3 2017/12/02 02:07:30 tg Exp $");
+__IDSTRING(rcsid_queue_h, "$MirOS: contrib/code/jupp/queue.h,v 1.4 2017/12/02 17:00:49 tg Exp $");
#endif
extern void *ITEM;
#define _JOE_QW_H 1
#ifdef EXTERN_UFILE_C
-__RCSID("$MirOS: contrib/code/jupp/qw.h,v 1.3 2017/12/02 02:07:30 tg Exp $");
+__IDSTRING(rcsid_qw_h, "$MirOS: contrib/code/jupp/qw.h,v 1.4 2017/12/02 17:00:49 tg Exp $");
#endif
/* QW *mkqw(W *w, char *prompt, int (*func)(), int (*abrt)(), void *object);
/*
* *rc file parser
* Copyright
- * (C) 1992 Joseph H. Allen;
+ * (C) 1992 Joseph H. Allen;
*
* This file is part of JOE (Joe's Own Editor)
*/
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/rc.c,v 1.26 2017/12/02 04:32:41 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/rc.c,v 1.28 2017/12/02 18:33:24 tg Exp $");
#include <string.h>
#ifdef HAVE_STDLIB_H
/* local means it's in an OPTION structure, global means it's in a global
* variable */
+#define F(x) NULL, &fdefault.x
+#define G(type,name,setiaddr,yes,no,menu,low,high) \
+ X(type,name,setiaddr,yes,no,menu,low,high)
+#define X(type,name,seti,addr,yes,no,menu,low,high) \
+ { UC name, { seti }, US addr, UC yes, UC no, UC menu, type, 0, low, high }
+#define L(x) &x, NULL
struct glopts {
- unsigned char *name; /* Option name */
- int type; /* 0 for global option flag
+ const unsigned char *name; /* Option name */
+ union {
+ int *i;
+ unsigned char **us;
+ } set; /* Address of global option */
+ unsigned char *addr; /* Local options structure member address */
+ const unsigned char *yes; /* Message if option was turned on, or prompt string */
+ const unsigned char *no; /* Message if option was turned off */
+ const unsigned char *menu; /* Menu string */
+ int type; /* 0 for global option flag
1 for global option numeric
2 for global option string
4 for local option flag
5 for local option numeric
6 for local option string
7 for local option numeric+1, with range checking
+ 8 for ...?
+ 9 for syntax
+ 13 for encoding
*/
- int *set; /* Address of global option */
- unsigned char *addr; /* Local options structure member address */
- unsigned char *yes; /* Message if option was turned on, or prompt string */
- unsigned char *no; /* Message if option was turned off */
- unsigned char *menu; /* Menu string */
int ofst; /* Local options structure member offset */
int low; /* Low limit for numeric options */
int high; /* High limit for numeric options */
} glopts[] = {
- {US "noxon", 0, &noxon, NULL, US "XON/XOFF processing disabled", US "XON/XOFF processing enabled", US " XON/XOFF usable " },
- {US "keepup", 0, &keepup, NULL, US "Status line updated constantly", US "Status line updated once/sec", US " Fast status line " },
- {US "baud", 1, &Baud, NULL, US "Terminal baud rate (%d): ", 0, US " Baud rate ", 0, 0, 38400 },
- {US "overwrite",4, NULL, (unsigned char *) &fdefault.overtype, US "Overtype mode", US "Insert mode", US "T Overtype " },
- {US "autoindent", 4, NULL, (unsigned char *) &fdefault.autoindent, US "Autoindent enabled", US "Autoindent disabled", US "I Autoindent " },
- {US "wordwrap", 4, NULL, (unsigned char *) &fdefault.wordwrap, US "Wordwrap enabled", US "Wordwrap disabled", US "Word wrap " },
- {US "tab", 5, NULL, (unsigned char *) &fdefault.tab, US "Tab width (%d): ", 0, US "D Tab width ", 0, 1, 64 },
- {US "lmargin", 7, NULL, (unsigned char *) &fdefault.lmargin, US "Left margin (%d): ", 0, US "Left margin ", 0, 0, 63 },
- {US "rmargin", 7, NULL, (unsigned char *) &fdefault.rmargin, US "Right margin (%d): ", 0, US "Right margin ", 0, 7, 255 },
- {US "square", 0, &square, NULL, US "Rectangle mode", US "Text-stream mode", US "X Rectangle mode " },
- {US "icase", 0, &icase, NULL, US "Ignore case by default", US "Case sensitive by default", US " Case insensitive " },
- {US "wrap", 0, &wrap, NULL, US "Search wraps", US "Search doesn't wrap", US " Search wraps " },
- {US "menu_explorer", 0, &menu_explorer, NULL, US "Menu explorer mode", US " Simple completion", US " Menu explorer " },
- {US "autoswap", 0, &autoswap, NULL, US "Autoswap ^KB and ^KK", US " Autoswap off ", US " Autoswap mode " },
- {US "indentc", 5, NULL, (unsigned char *) &fdefault.indentc, US "Indent char %d (SPACE=32, TAB=9, ^C to abort): ", 0, US " Indent char ", 0, 0, 255 },
- {US "istep", 5, NULL, (unsigned char *) &fdefault.istep, US "Indent step %d (^C to abort): ", 0, US " Indent step ", 0, 1, 64 },
- {US "french", 4, NULL, (unsigned char *) &fdefault.french, US "One space after periods for paragraph reformat", US "Two spaces after periods for paragraph reformat", US " French spacing " },
- {US "highlight", 4, NULL, (unsigned char *) &fdefault.highlight, US "Highlighting enabled", US "Highlighting disabled", US "Highlighting " },
- {US "spaces", 4, NULL, (unsigned char *) &fdefault.spaces, US "Inserting spaces when tab key is hit", US "Inserting tabs when tab key is hit", US " Disable tabs " },
- {US "mid", 0, &mid, NULL, US "Cursor will be recentered on scrolls", US "Cursor will not be recentered on scroll", US "Center on scroll " },
- {US "guess_crlf",0, &guesscrlf, NULL, US "Automatically detect MS-DOS files", US "Do not automatically detect MS-DOS files", US " Auto detect CR-LF " },
- {US "guess_indent",0, &guessindent, NULL, US "Automatically detect indentation", US "Do not automatically detect indentation", US " Guess indent " },
- {US "crlf", 4, NULL, (unsigned char *) &fdefault.crlf, US "CR-LF is line terminator", US "LF is line terminator", US "Z CR-LF (MS-DOS) " },
- {US "linums", 4, NULL, (unsigned char *) &fdefault.linums, US "Line numbers enabled", US "Line numbers disabled", US "N Line numbers " },
- {US "marking", 0, &marking, NULL, US "Anchored block marking on", US "Anchored block marking off", US "Marking " },
- {US "asis", 0, &dspasis, NULL, US "Characters above 127 shown as-is", US "Characters above 127 shown in inverse", US " Meta chars as-is " },
- {US "force", 0, &force, NULL, US "Last line forced to have NL when file saved", US "Last line not forced to have NL", US "Force last NL " },
- {US "nobackups", 0, &nobackups, NULL, US "Backup files will not be made", US "Backup files will be made", US " Disable backups " },
- {US "lightoff", 0, &lightoff, NULL, US "Highlighting turned off after block operations", US "Highlighting not turned off after block operations", US "Auto unmark " },
- {US "exask", 0, &exask, NULL, US "Prompt for filename in save & exit command", US "Don't prompt for filename in save & exit command", US " Exit ask " },
- {US "beep", 0, &dobeep, NULL, US "Warning bell enabled", US "Warning bell disabled", US "Beeps " },
- {US "nosta", 0, &staen, NULL, US "Top-most status line disabled", US "Top-most status line enabled", US " Disable status " },
- {US "pg", 1, &pgamnt, NULL, US "Lines to keep for PgUp/PgDn or -1 for 1/2 window (%d): ", 0, US " # PgUp/PgDn lines ", 0, -1, 64 },
- {US "csmode", 0, &csmode, NULL, US "Start search after a search repeats previous search", US "Start search always starts a new search", US "Continued search " },
- {US "rdonly", 4, NULL, (unsigned char *) &fdefault.readonly, US "Read only", US "Full editing", US "O Read only " },
- {US "smarthome", 4, NULL, (unsigned char *) &fdefault.smarthome, US "Smart home key enabled", US "Smart home key disabled", US " Smart home key " },
- {US "indentfirst", 4, NULL, (unsigned char *) &fdefault.indentfirst, US "Smart home goes to indent first", US "Smart home goes home first", US " To indent first " },
- {US "smartbacks", 4, NULL, (unsigned char *) &fdefault.smartbacks, US "Smart backspace key enabled", US "Smart backspace key disabled", US " Smart backspace " },
- {US "purify", 4, NULL, (unsigned char *) &fdefault.purify, US "Indentation clean up enabled", US "Indentation clean up disabled", US " Clean up indents " },
- {US "picture", 4, NULL, (unsigned char *) &fdefault.picture, US "Picture drawing mode enabled", US "Picture drawing mode disabled", US "Picture mode " },
- {US "backpath", 2, (int *) &backpath, NULL, US "Backup files stored in (%s): ", 0, US " Backup file path " },
- {US "vispace", 4, NULL, (unsigned char *) &fdefault.vispace, US "Spaces visible", US "Spaces invisible", US "Visible spaces " },
- {US "hex", 4, NULL, (unsigned char *) &fdefault.hex, US "Hex edit mode", US "Text edit mode", US "G Hexedit mode "},
- {US "syntax", 9, NULL, NULL, US "Select syntax (%s; ^C to abort): ", 0, US "Y Syntax" },
- {US "encoding",13, NULL, NULL, US "Select file character set (%s; ^C to abort): ", 0, US "Encoding " },
- {US "nonotice", 0, &nonotice, NULL, 0, 0, 0 },
- {US "orphan", 0, &orphan, NULL, 0, 0, 0 },
- {US "help", 0, &help, NULL, 0, 0, 0 },
- {US "dopadding", 0, &dopadding, NULL, 0, 0, 0 },
- {US "lines", 1, &lines, NULL, 0, 0, 0, 0, 2, 1024 },
- {US "columns", 1, &columns, NULL, 0, 0, 0, 0, 2, 1024 },
- {US "skiptop", 1, &skiptop, NULL, 0, 0, 0, 0, 0, 64 },
- {US "notite", 0, ¬ite, NULL, 0, 0, 0 },
- {US "pastetite", 0, &pastetite, NULL, 0, 0, 0 },
- {US "usetabs", 0, &usetabs, NULL, 0, 0, 0 },
- {US "assume_color", 0, &assume_color, NULL, 0, 0, 0 },
- { NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0 }
+G( 0, "noxon", L(noxon), "XON/XOFF processing disabled", "XON/XOFF processing enabled", " XON/XOFF usable ", 0, 0),
+G( 0, "keepup", L(keepup), "Status line updated constantly", "Status line updated once/sec", " Fast status line ", 0, 0),
+G( 1, "baud", L(Baud), "Terminal baud rate (%d): ", NULL, " Baud rate ", 0, 38400),
+G( 4, "overwrite", F(overtype), "Overtype mode", "Insert mode", "T Overtype ", 0, 0),
+G( 4, "autoindent", F(autoindent), "Autoindent enabled", "Autoindent disabled", "I Autoindent ", 0, 0),
+G( 4, "wordwrap", F(wordwrap), "Wordwrap enabled", "Wordwrap disabled", "Word wrap ", 0, 0),
+G( 5, "tab", F(tab), "Tab width (%d): ", NULL, "D Tab width ", 1, 64),
+G( 7, "lmargin", F(lmargin), "Left margin (%d): ", NULL, "Left margin ", 0, 63),
+G( 7, "rmargin", F(rmargin), "Right margin (%d): ", NULL, "Right margin ", 7, 255),
+G( 0, "square", L(square), "Rectangle mode", "Text-stream mode", "X Rectangle mode ", 0, 0),
+G( 0, "icase", L(icase), "Ignore case by default", "Case sensitive by default", " Case insensitive ", 0, 0),
+G( 0, "wrap", L(wrap), "Search wraps", "Search doesn't wrap", " Search wraps ", 0, 0),
+G( 0, "menu_explorer", L(menu_explorer), "Menu explorer mode", " Simple completion", " Menu explorer ", 0, 0),
+G( 0, "autoswap", L(autoswap), "Autoswap ^KB and ^KK", " Autoswap off ", " Autoswap mode ", 0, 0),
+G( 5, "indentc", F(indentc), "Indent char %d (SPACE=32, TAB=9, ^C to abort): ", NULL, " Indent char ", 0, 255),
+G( 5, "istep", F(istep), "Indent step %d (^C to abort): ", NULL, " Indent step ", 1, 64),
+G( 4, "french", F(french), "One space after periods for paragraph reformat", "Two spaces after periods for paragraph reformat", " French spacing ", 0, 0),
+G( 4, "highlight", F(highlight), "Highlighting enabled", "Highlighting disabled", "Highlighting ", 0, 0),
+G( 4, "spaces", F(spaces), "Inserting spaces when tab key is hit", "Inserting tabs when tab key is hit", " Disable tabs ", 0, 0),
+G( 0, "mid", L(mid), "Cursor will be recentered on scrolls", "Cursor will not be recentered on scroll", "Center on scroll ", 0, 0),
+G( 0, "guess_crlf", L(guesscrlf), "Automatically detect MS-DOS files", "Do not automatically detect MS-DOS files", " Auto detect CR-LF ", 0, 0),
+G( 0, "guess_indent", L(guessindent), "Automatically detect indentation", "Do not automatically detect indentation", " Guess indent ", 0, 0),
+G( 4, "crlf", F(crlf), "CR-LF is line terminator", "LF is line terminator", "Z CR-LF (MS-DOS) ", 0, 0),
+G( 4, "linums", F(linums), "Line numbers enabled", "Line numbers disabled", "N Line numbers ", 0, 0),
+G( 0, "marking", L(marking), "Anchored block marking on", "Anchored block marking off", "Marking ", 0, 0),
+G( 0, "asis", L(dspasis), "Characters above 127 shown as-is", "Characters above 127 shown in inverse", " Meta chars as-is ", 0, 0),
+G( 0, "force", L(force), "Last line forced to have NL when file saved", "Last line not forced to have NL", "Force last NL ", 0, 0),
+G( 0, "nobackups", L(nobackups), "Backup files will not be made", "Backup files will be made", " Disable backups ", 0, 0),
+G( 0, "lightoff", L(lightoff), "Highlighting turned off after block operations", "Highlighting not turned off after block operations", "Auto unmark ", 0, 0),
+G( 0, "exask", L(exask), "Prompt for filename in save & exit command", "Don't prompt for filename in save & exit command", " Exit ask ", 0, 0),
+G( 0, "beep", L(dobeep), "Warning bell enabled", "Warning bell disabled", "Beeps ", 0, 0),
+G( 0, "nosta", L(staen), "Top-most status line disabled", "Top-most status line enabled", " Disable status ", 0, 0),
+G( 1, "pg", L(pgamnt), "Lines to keep for PgUp/PgDn or -1 for 1/2 window (%d): ", NULL, " # PgUp/PgDn lines ", -1, 64),
+G( 0, "csmode", L(csmode), "Start search after a search repeats previous search", "Start search always starts a new search", "Continued search ", 0, 0),
+G( 4, "rdonly", F(readonly), "Read only", "Full editing", "O Read only ", 0, 0),
+G( 4, "smarthome", F(smarthome), "Smart home key enabled", "Smart home key disabled", " Smart home key ", 0, 0),
+G( 4, "indentfirst", F(indentfirst), "Smart home goes to indent first", "Smart home goes home first", " To indent first ", 0, 0),
+G( 4, "smartbacks", F(smartbacks), "Smart backspace key enabled", "Smart backspace key disabled", " Smart backspace ", 0, 0),
+G( 4, "purify", F(purify), "Indentation clean up enabled", "Indentation clean up disabled", " Clean up indents ", 0, 0),
+G( 4, "picture", F(picture), "Picture drawing mode enabled", "Picture drawing mode disabled", "Picture mode ", 0, 0),
+X( 2, "backpath", NULL, NULL, "Backup files stored in (%s): ", NULL, " Backup file path ", 0, 0),
+G( 4, "vispace", F(vispace), "Spaces visible", "Spaces invisible", "Visible spaces ", 0, 0),
+G( 4, "hex", F(hex), "Hex edit mode", "Text edit mode", "G Hexedit mode ", 0, 0),
+X( 9, "syntax", NULL, NULL, "Select syntax (%s; ^C to abort): ", NULL, "Y Syntax", 0, 0),
+X(13, "encoding", NULL, NULL, "Select file character set (%s; ^C to abort): ", NULL, "Encoding ", 0, 0),
+G( 0, "nonotice", L(nonotice), NULL, NULL, NULL, 0, 0),
+G( 0, "orphan", L(orphan), NULL, NULL, NULL, 0, 0),
+G( 0, "help", L(help), NULL, NULL, NULL, 0, 0),
+G( 0, "dopadding", L(dopadding), NULL, NULL, NULL, 0, 0),
+G( 1, "lines", L(lines), NULL, NULL, NULL, 2, 1024),
+G( 1, "columns", L(columns), NULL, NULL, NULL, 2, 1024),
+G( 1, "skiptop", L(skiptop), NULL, NULL, NULL, 0, 64),
+G( 0, "notite", L(notite), NULL, NULL, NULL, 0, 0),
+G( 0, "pastetite", L(pastetite), NULL, NULL, NULL, 0, 0),
+G( 0, "usetabs", L(usetabs), NULL, NULL, NULL, 0, 0),
+G( 0, "assume_color", L(assume_color), NULL, NULL, NULL, 0, 0),
+X( 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0)
};
+#undef F
+#undef G
+#undef L
+#undef X
/* Initialize .ofsts above. Is this really necessary? */
for (x = 0; glopts[x].name; ++x)
switch (glopts[x].type) {
+ case 2:
+ if (!strcmp((const char *)glopts[x].name, "backpath"))
+ glopts[x].set.us = &backpath;
+ break;
case 4:
case 5:
case 6:
switch (glopts[x].type) {
case 0: /* Global variable flag option */
if (set)
- *glopts[x].set = st;
+ *glopts[x].set.i = st;
break;
case 1: /* Global variable integer option */
if (set && arg) {
sscanf((char *)arg, "%d", &val);
if (val >= glopts[x].low && val <= glopts[x].high)
- *glopts[x].set = val;
+ *glopts[x].set.i = val;
}
break;
case 2: /* Global variable string option */
if (set) {
if (arg)
- *(unsigned char **) glopts[x].set = (unsigned char *)strdup((char *)arg);
+ *glopts[x].set.us = (unsigned char *)strdup((char *)arg);
else
- *(unsigned char **) glopts[x].set = 0;
+ *glopts[x].set.us = NULL;
}
break;
case 4: /* Local option flag */
if (val >= glopts[x].low && val <= glopts[x].high)
*(int *) ((unsigned char *)
options_ + glopts[x].ofst) = val;
- }
+ }
}
break;
case 7: /* Local option numeric + 1, with range checking */
msgnw(bw->parent, merrt);
ret = -1;
} else if (v >= glopts[x].low && v <= glopts[x].high)
- *glopts[x].set = v;
+ *glopts[x].set.i = v;
else {
msgnw(bw->parent, US "Value out of range");
ret = -1;
break;
case 2:
if (s[0])
- *(unsigned char **) glopts[x].set = (unsigned char *)strdup((char *)s);
+ *glopts[x].set.us = (unsigned char *)strdup((char *)s);
break;
case 5:
if (!*s) {
ret = -1;
break;
}
- v = calcldec(bw, s);
+ v = calcl(bw, s) - 1L;
if (merrf) {
msgnw(bw->parent, merrt);
ret = -1;
switch (glopts[x].type) {
case 0:
if (!flg)
- *glopts[x].set = !*glopts[x].set;
+ *glopts[x].set.i = !*glopts[x].set.i;
else if (flg == 1)
- *glopts[x].set = 1;
+ *glopts[x].set.i = 1;
else
- *glopts[x].set = 0;
+ *glopts[x].set.i = 0;
wabort(m->parent);
- msgnw(bw->parent, *glopts[x].set ? glopts[x].yes : glopts[x].no);
- if (glopts[x].set == &noxon)
+ msgnw(bw->parent, *glopts[x].set.i ? glopts[x].yes : glopts[x].no);
+ if (glopts[x].set.i == &noxon)
tty_xonoffbaudrst();
break;
case 4:
}
break;
case 1:
- joe_snprintf_1((char *)buf, OPT_BUF_SIZE, (char *)glopts[x].yes, *glopts[x].set);
+ joe_snprintf_1((char *)buf, OPT_BUF_SIZE, (char *)glopts[x].yes, *glopts[x].set.i);
xx = (int *) joe_malloc(sizeof(int));
*xx = x;
m->parent->notify = 0;
wabort(m->parent);
if (wmkpw(bw->parent, buf, NULL, doopt1, NULL, doabrt1, utypebw, xx, notify, locale_map)) {
- if (glopts[x].set == &Baud)
+ if (glopts[x].set.i == &Baud)
tty_xonoffbaudrst();
return 0;
} else
return -1;
case 2:
- if (*(unsigned char **) glopts[x].set)
- joe_snprintf_1((char *)buf, OPT_BUF_SIZE, (char *)glopts[x].yes, *(unsigned char **) glopts[x].set);
+ if (*glopts[x].set.us)
+ joe_snprintf_1((char *)buf, OPT_BUF_SIZE, (char *)glopts[x].yes, *glopts[x].set.us);
else
joe_snprintf_1((char *)buf, OPT_BUF_SIZE, (char *)glopts[x].yes, "");
xx = (int *) joe_malloc(sizeof(int));
switch (glopts[x].type) {
case 0:
joe_snprintf_1(s[x] + n, OPT_BUF_SIZE - n,
- "%s", *glopts[x].set ? "ON" : "OFF");
+ "%s", *glopts[x].set.i ? "ON" : "OFF");
break;
case 1:
joe_snprintf_1(s[x] + n, OPT_BUF_SIZE - n,
- "%d", *glopts[x].set);
+ "%d", *glopts[x].set.i);
break;
case 2:
strlcpy(s[x] + n, "...", OPT_BUF_SIZE - n);
#define _JOE_RC_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/rc.h,v 1.5 2017/12/02 02:07:31 tg Exp $");
+__IDSTRING(rcsid_rc_h, "$MirOS: contrib/code/jupp/rc.h,v 1.6 2017/12/02 17:00:49 tg Exp $");
#endif
extern OPTIONS pdefault;
#define _JOE_REGEX_H 1
#ifdef EXTERN_RC_C
-__RCSID("$MirOS: contrib/code/jupp/regex.h,v 1.3 2017/12/02 02:07:31 tg Exp $");
+__IDSTRING(rcsid_regex_h, "$MirOS: contrib/code/jupp/regex.h,v 1.4 2017/12/02 17:00:50 tg Exp $");
#endif
int escape PARAMS((int utf8,unsigned char **a, int *b));
#define _JOE_SCRN_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/scrn.h,v 1.6 2017/12/02 02:07:31 tg Exp $");
+__IDSTRING(rcsid_scrn_h, "$MirOS: contrib/code/jupp/scrn.h,v 1.7 2017/12/02 17:00:50 tg Exp $");
#endif
#include "tty.h" /* ttputc() */
#define _Isyntax 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/syntax.h,v 1.4 2017/12/02 02:07:32 tg Exp $");
+__IDSTRING(rcsid_syntax_h, "$MirOS: contrib/code/jupp/syntax.h,v 1.5 2017/12/02 17:00:50 tg Exp $");
#endif
#include "hash.h"
-# $MirOS: contrib/code/jupp/syntax/asm.jsf.in,v 1.3 2012/09/02 14:46:51 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/asm.jsf.in,v 1.4 2017/12/02 05:38:05 tg Exp $
#-
# JOE syntax highlight file for assembly language
=Idle
=Bad bold red
-=Preproc blue
+=Preproc yellow
=Define bold blue
=Comment green
=IncLocal cyan
-# $MirOS: contrib/code/jupp/syntax/c.jsf.in,v 1.7 2016/10/07 19:43:56 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/c.jsf.in,v 1.8 2017/12/02 05:38:05 tg Exp $
#-
# JOE syntax highlight file for C and C++
=Idle
=Bad bold red
-=Preproc blue
+=Preproc yellow
=Define bold blue
=Comment green
=IncLocal cyan
-# $MirOS: contrib/code/jupp/syntax/fortran.jsf.in,v 1.2 2008/05/13 16:17:44 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/fortran.jsf.in,v 1.3 2017/12/02 05:38:05 tg Exp $
#-
# JOE syntax highlight file for FORTRAN
# Heavily improved by: Malte Thoma (thoma@uni-muenster.de)
=Type red
=Keyword bold
=Intrinsic magenta
-=Preproc blue
+=Preproc yellow
=Operator magenta
=Bad bold red
-# $MirOS: contrib/code/jupp/syntax/java.jsf.in,v 1.3 2012/09/02 14:46:51 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/java.jsf.in,v 1.4 2017/12/02 05:38:05 tg Exp $
#-
# JOE syntax highlight file for JAVA
=Idle
-=Preproc blue
+=Preproc yellow
=Define bold blue
=Comment green
=Constant cyan
-# $MirOS: contrib/code/jupp/syntax/mason.jsf.in,v 1.2 2008/05/13 16:17:45 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/mason.jsf.in,v 1.3 2017/12/02 05:38:06 tg Exp $
#-
# JOE syntax highlight file for HTML
# This needs lots of work...
# Define colors
=Idle
-=Preproc blue
+=Preproc yellow
=Comment green
=Constant cyan
=Escape bold cyan
-# $MirOS: contrib/code/jupp/syntax/perl.jsf.in,v 1.3 2012/09/02 14:46:52 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/perl.jsf.in,v 1.4 2017/12/02 05:38:06 tg Exp $
#-
# JOE syntax highlight file for Perl
# Define colors
=Idle
-=Preproc blue
+=Preproc yellow
=Comment green
=Constant cyan
=Escape bold cyan
-# $MirOS: contrib/code/jupp/syntax/xml.jsf.in,v 1.3 2012/06/07 22:34:54 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/xml.jsf.in,v 1.4 2017/12/02 05:38:06 tg Exp $
#-
# Improved XML highlighter by: Brian Candler <B.Candler@pobox.com>
=Idle
=Error red bold
-=Tag blue
+=Tag yellow
=Attr cyan
=Constant blue bold
=EntityRef magenta
#define _JOE_TAB_H 1
#ifdef EXTERN_UFILE_C
-__RCSID("$MirOS: contrib/code/jupp/tab.h,v 1.3 2017/12/02 02:07:32 tg Exp $");
+__IDSTRING(rcsid_tab_h, "$MirOS: contrib/code/jupp/tab.h,v 1.4 2017/12/02 17:00:50 tg Exp $");
#endif
int cmplt PARAMS((BW *bw));
#define _JOE_TERMCAP_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/termcap.h,v 1.5 2017/12/02 02:07:33 tg Exp $");
+__IDSTRING(rcsid_termcap_h, "$MirOS: contrib/code/jupp/termcap.h,v 1.6 2017/12/02 17:00:50 tg Exp $");
#endif
/* CAP *getcap(char *s,int baud,void (*out)(void *outptr,char c),void *outptr);
#define _JOE_TTY_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/tty.h,v 1.9 2017/12/02 02:07:33 tg Exp $");
+__IDSTRING(rcsid_tty_h, "$MirOS: contrib/code/jupp/tty.h,v 1.10 2017/12/02 17:00:50 tg Exp $");
#endif
/* void ttopen(void); Open the tty (attached to stdin) for use inside of JOE
#define _JOE_TW_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/tw.h,v 1.4 2017/12/02 02:07:33 tg Exp $");
+__IDSTRING(rcsid_tw_h, "$MirOS: contrib/code/jupp/tw.h,v 1.5 2017/12/02 17:00:50 tg Exp $");
#endif
BW *wmktw PARAMS((SCREEN *t, B *b));
#define _JOE_TYPES_H
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/types.h,v 1.16 2017/12/02 02:07:33 tg Exp $");
+__IDSTRING(rcsid_types_h, "$MirOS: contrib/code/jupp/types.h,v 1.18 2017/12/02 18:33:25 tg Exp $");
#endif
/* Prefix to make string constants unsigned */
+#define UC (const unsigned char *)
#define US (unsigned char *)
#define LINK(type) struct { type *next; type *prev; }
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/ublock.c,v 1.18 2017/12/02 04:32:41 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/ublock.c,v 1.19 2017/12/02 18:50:03 tg Exp $");
#include <unistd.h>
#ifdef HAVE_STDLIB_H
struct marksav {
LINK(MARKSAV) link;
P *markb, *markk;
-} markstack = { { &markstack, &markstack} };
-MARKSAV markfree = { {&markfree, &markfree} };
+} markstack = { { &markstack, &markstack}, NULL, NULL };
+MARKSAV markfree = { {&markfree, &markfree}, NULL, NULL };
int nstack = 0;
int upsh(BW *bw)
#define _JOE_UBLOCK_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/ublock.h,v 1.3 2017/12/02 02:07:34 tg Exp $");
+__IDSTRING(rcsid_ublock_h, "$MirOS: contrib/code/jupp/ublock.h,v 1.4 2017/12/02 17:00:51 tg Exp $");
#endif
extern int square;
#define _JOE_UEDIT_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/uedit.h,v 1.6 2017/12/02 02:07:34 tg Exp $");
+__IDSTRING(rcsid_uedit_h, "$MirOS: contrib/code/jupp/uedit.h,v 1.7 2017/12/02 17:00:51 tg Exp $");
#endif
extern int pgamnt;
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/uerror.c,v 1.5 2017/12/02 02:07:34 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/uerror.c,v 1.6 2017/12/02 18:50:03 tg Exp $");
#include "b.h"
#include "bw.h"
unsigned char *file; /* Target file name */
long src; /* Error-file line number */
unsigned char *msg; /* The message */
-} errors = { { &errors, &errors} };
+} errors = { { &errors, &errors}, 0, 0, NULL, 0, NULL };
ERROR *errptr = &errors; /* Current error row */
B *errbuf = NULL; /* Buffer with error messages */
}
/* Pool of free error nodes */
-ERROR errnodes = { {&errnodes, &errnodes} };
+ERROR errnodes = { {&errnodes, &errnodes}, 0, 0, NULL, 0, NULL };
/* Free an error node */
#define _JOE_UERROR_H 1
#ifdef EXTERN_B_C
-__RCSID("$MirOS: contrib/code/jupp/uerror.h,v 1.3 2017/12/02 02:07:34 tg Exp $");
+__IDSTRING(rcsid_uerror_h, "$MirOS: contrib/code/jupp/uerror.h,v 1.4 2017/12/02 17:00:51 tg Exp $");
#endif
int unxterr PARAMS((BW *bw));
#define _JOE_UFILE_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/ufile.h,v 1.5 2017/12/02 02:07:35 tg Exp $");
+__IDSTRING(rcsid_ufile_h, "$MirOS: contrib/code/jupp/ufile.h,v 1.6 2017/12/02 17:00:51 tg Exp $");
#endif
extern int exask;
#define _JOE_UFORMAT_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/uformat.h,v 1.3 2017/12/02 02:07:35 tg Exp $");
+__IDSTRING(rcsid_uformat_h, "$MirOS: contrib/code/jupp/uformat.h,v 1.4 2017/12/02 17:00:51 tg Exp $");
#endif
int ucenter PARAMS((BW *bw));
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/uisrch.c,v 1.9 2017/12/02 04:32:42 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/uisrch.c,v 1.10 2017/12/02 18:50:03 tg Exp $");
#include <stdlib.h>
extern SRCH *globalsrch; /* Existing SRCH structure */
-IREC fri = { {&fri, &fri} }; /* Free-list of irecs */
+IREC fri = { {&fri, &fri}, 0, 0, 0, 0 }; /* Free-list of irecs */
static IREC *alirec(void)
{ /* Allocate an IREC */
#define _JOE_UISRCH_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/uisrch.h,v 1.3 2017/12/02 02:07:35 tg Exp $");
+__IDSTRING(rcsid_uisrch_h, "$MirOS: contrib/code/jupp/uisrch.h,v 1.4 2017/12/02 17:00:51 tg Exp $");
#endif
int uisrch PARAMS((BW *bw));
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/umath.c,v 1.11 2017/12/02 04:32:42 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/umath.c,v 1.15 2017/12/02 18:33:25 tg Exp $");
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
static char math_res[JOE_MSGBUFSIZE];
static char *math_exp;
+static double calc(BW *bw, unsigned char *s);
+
static RETSIGTYPE fperr(int unused)
{
if (!merrf)
while ((*ptr >= '0' && *ptr <= '9') || ((*ptr | 0x20) >= 'a' && (*ptr | 0x20) <= 'f'))
++ptr;
} else if ((*ptr >= '0' && *ptr <= '9') || *ptr == '.') {
- x = strtod(ptr, &ptr);
+ char *eptr;
+
+ x = strtod(ptr, &eptr);
+ ptr = (unsigned char *)eptr;
} else if (*ptr == '(') {
++ptr;
x = expr(0, &v);
#define JOE_IMAXT "l"
#endif
-double calc(BW *bw, unsigned char *s)
+static double
+calc(BW *bw, unsigned char *s)
{
double result;
struct var *v;
binss(bw->cursor, (void *)math_res);
return 0;
}
+
+long
+calcl(BW *bw, unsigned char *s)
+{
+ double rv;
+
+ rv = calc(bw, s);
+ return ((long)rv);
+}
#else
long
calcl(BW *bw, unsigned char *s)
#define _JOE_UMATH_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/umath.h,v 1.8 2017/12/02 04:15:29 tg Exp $");
+__IDSTRING(rcsid_umath_h, "$MirOS: contrib/code/jupp/umath.h,v 1.10 2017/12/02 17:00:51 tg Exp $");
#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
-extern volatile sig_atomic_t merrf;
+extern volatile sig_atomic_t merrf;
extern const unsigned char *merrt;
+long calcl(BW *bw, unsigned char *s);
+
#if WANT_MATH
-double calc(BW *bw, unsigned char *s);
int umath(BW *bw);
int umathins(BW *bw);
int umathres(BW *bw);
-
-#define calcl(bw,s) ((long)calc((bw), (s)))
-#define calcldec(bw,s) ((long)(calc((bw), (s)) - 1.0))
-
#else
-
-long calcl(BW *bw, unsigned char *s);
int unomath(BW *bw);
#define umath unomath
#define umathins unomath
#define umathres unomath
-#define calcldec(bw,s) (calcl((bw), (s)) - 1L)
-
-#endif /* !WANT_MATH */
+#endif
#endif
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/undo.c,v 1.4 2017/12/02 02:07:36 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/undo.c,v 1.5 2017/12/02 18:50:03 tg Exp $");
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#define SMALL 1024
-static UNDO undos = { {&undos, &undos} };
-static UNDO frdos = { {&frdos, &frdos} };
+static UNDO undos = { {&undos, &undos}, NULL, 0, { {NULL, NULL}, NULL, 0, 0, 0, 0, 0, NULL, NULL }, NULL, NULL, NULL };
+static UNDO frdos = { {&frdos, &frdos}, NULL, 0, { {NULL, NULL}, NULL, 0, 0, 0, 0, 0, NULL, NULL }, NULL, NULL, NULL };
int inundo = 0;
int inredo = 0;
extern int dostaupd;
-UNDOREC yanked = { {&yanked, &yanked} };
+UNDOREC yanked = { {&yanked, &yanked}, NULL, 0, 0, 0, 0, 0, NULL, NULL };
int nyanked = 0;
int inyank = 0;
int justkilled = 0;
-UNDOREC frrecs = { {&frrecs, &frrecs} };
+UNDOREC frrecs = { {&frrecs, &frrecs}, NULL, 0, 0, 0, 0, 0, NULL, NULL };
static UNDOREC *alrec(void)
{
#define _JOE_UNDO_H 1
#ifdef EXTERN_B_C
-__RCSID("$MirOS: contrib/code/jupp/undo.h,v 1.3 2017/12/02 02:07:36 tg Exp $");
+__IDSTRING(rcsid_undo_h, "$MirOS: contrib/code/jupp/undo.h,v 1.4 2017/12/02 17:00:51 tg Exp $");
#endif
extern int inundo;
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/usearch.c,v 1.11 2017/12/02 02:07:36 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/usearch.c,v 1.12 2017/12/02 18:50:04 tg Exp $");
#include <stdlib.h>
SRCH *globalsrch = NULL; /* Most recent completed search data */
-SRCHREC fsr = { {&fsr, &fsr} };
+SRCHREC fsr = { {&fsr, &fsr}, 0, 0, 0 };
/* Completion stuff: should go somewhere else */
#define _JOE_USEARCH_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/usearch.h,v 1.3 2017/12/02 02:07:36 tg Exp $");
+__IDSTRING(rcsid_usearch_h, "$MirOS: contrib/code/jupp/usearch.h,v 1.4 2017/12/02 17:00:51 tg Exp $");
#endif
SRCH *mksrch PARAMS((unsigned char *pattern, unsigned char *replacement, int ignore, int backwards, int repeat, int replace, int rest));
#define _JOE_USHELL_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/ushell.h,v 1.4 2017/12/02 02:07:36 tg Exp $");
+__IDSTRING(rcsid_ushell_h, "$MirOS: contrib/code/jupp/ushell.h,v 1.5 2017/12/02 17:00:52 tg Exp $");
#endif
int ubknd PARAMS((BW *bw));
#define _JOE_UTAG_H 1
#ifdef EXTERN_CMD_C
-__RCSID("$MirOS: contrib/code/jupp/utag.h,v 1.3 2017/12/02 02:07:37 tg Exp $");
+__IDSTRING(rcsid_utag_h, "$MirOS: contrib/code/jupp/utag.h,v 1.4 2017/12/02 17:00:52 tg Exp $");
#endif
int utag PARAMS((BW *bw));
#define _Iutf8 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/utf8.h,v 1.5 2017/12/02 02:07:37 tg Exp $");
+__IDSTRING(rcsid_utf8_h, "$MirOS: contrib/code/jupp/utf8.h,v 1.6 2017/12/02 17:00:52 tg Exp $");
#endif
#include "i18n.h"
#define _JOE_UTILS_H 1
#ifdef EXTERN_B_C
-__RCSID("$MirOS: contrib/code/jupp/utils.h,v 1.7 2017/12/02 03:52:35 tg Exp $");
+__IDSTRING(rcsid_utils_h, "$MirOS: contrib/code/jupp/utils.h,v 1.8 2017/12/02 17:00:52 tg Exp $");
#endif
#ifdef HAVE_SIGNAL_H
#define _JOE_VA_H 1
#ifdef EXTERN_B_C
-__RCSID("$MirOS: contrib/code/jupp/va.h,v 1.4 2017/12/02 02:07:37 tg Exp $");
+__IDSTRING(rcsid_va_h, "$MirOS: contrib/code/jupp/va.h,v 1.5 2017/12/02 17:00:52 tg Exp $");
#endif
#include "vs.h"
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/vfile.c,v 1.10 2017/12/02 02:07:38 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/vfile.c,v 1.11 2017/12/02 18:50:04 tg Exp $");
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#include "vfile.h"
#include "vs.h"
-static VFILE vfiles = { {&vfiles, &vfiles} }; /* Known vfiles */
+ /* Known vfiles */
+static VFILE vfiles = { {&vfiles, &vfiles}, 0, 0, 0, 0, NULL, 0, NULL, 0, NULL, NULL, 0, 0 };
static VPAGE *freepages = NULL; /* Linked list of free pages */
static VPAGE *htab[HTSIZE]; /* Hash table of page headers */
static long curvalloc = 0; /* Amount of memory in use */
#define _JOE_VFILE_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/vfile.h,v 1.4 2017/12/02 02:07:38 tg Exp $");
+__IDSTRING(rcsid_vfile_h, "$MirOS: contrib/code/jupp/vfile.h,v 1.5 2017/12/02 17:00:52 tg Exp $");
#endif
/* Additions:
#define _JOE_VS_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/vs.h,v 1.7 2017/12/02 02:07:38 tg Exp $");
+__IDSTRING(rcsid_vs_h, "$MirOS: contrib/code/jupp/vs.h,v 1.8 2017/12/02 17:00:52 tg Exp $");
#endif
#include <string.h>
#define _JOE_W_H 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/w.h,v 1.5 2017/12/02 02:07:38 tg Exp $");
+__IDSTRING(rcsid_w_h, "$MirOS: contrib/code/jupp/w.h,v 1.6 2017/12/02 17:00:53 tg Exp $");
#endif
/***************/