Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ jobs:
run: |
git clean -x -d -f .
mingw32-make -f makefile.msys git.c
rm libloc.c
- name: Download PDF manual
uses: actions/download-artifact@v4.1.7
with:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ Makefile.in
*.exe
git.c
logo_win.res
.vscode/browse.*
.*
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I think I would rather add .????* than private space unicode characters.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe .[!:alnum:][!:alnum:][!:alnum:][!:alnum:]* ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion

*~
*.swp


111 changes: 111 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am hesitant to approve adding this files. However, I think I would be fine with adding a defaults directory or similar with them inside, so people could just copy them into the main directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for me. It needs documentation to be really useful anyway.

I was thinking of asking if we could add a contrib directory for stuff like that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contrib sounds fine to me.

"env": {
"myIncludePath": [
"${workspaceFolder}",
"/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0",
"/usr/include/wx-3.0"
]
},
"configurations": [
{
"name": "Linux",
"compilerPath": "/usr/bin/gcc",
"compilerArgs": [],
"includePath": [
"${myIncludePath}"
],
"defines": [
"HAVE_CONFIG_H",
"_FILE_OFFSET_BITS=64",
"WXUSINGDLL",
"__WXGTK__"
],
"cStandard": "c90",
"cppStandard": "gnu++14",
"configurationProvider": "ms-vscode.cmake-tools",
"forcedInclude": [],
"compileCommands": [],
"dotConfig": "${workspaceFolder}/.config",
"mergeConfigurations": true,
"customConfigurationVariables": {
"myVar": "myvalue"
},
"browse": {
"path": [
"${myIncludePath}",
"/usr/include",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db"
}
},
{
"name": "win32",
"compilerPath": "/usr/bin/gcc",
"compilerArgs": [],
"includePath": [
"${workspaceFolder}/**",
"${myIncludePath}"
],
"defines": [
"WIN32",
"HAVE_WX",
"HAVE_CONFIG_C",
"X_DISPLAY_MISSING",
"__WXDEBUG__",
"__WXMSW__"
],
"cStandard": "c90",
"cppStandard": "gnu++14",
"configurationProvider": "ms-vscode.cmake-tools",
"forcedInclude": [],
"compileCommands": [],
"dotConfig": "${workspaceFolder}/.config",
"mergeConfigurations": true,
"customConfigurationVariables": {
"myVar": "myvalue"
},
"browse": {
"path": [
"${myIncludePath}",
"/usr/include",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db"
}
},
{
"name": "dos",
"compilerPath": "/usr/bin/gcc",
"compilerArgs": [],
"includePath": [
"${myIncludePath}"
],
"defines": [
"__TURBOC__"
],
"cStandard": "c90",
"cppStandard": "gnu++14",
"configurationProvider": "ms-vscode.cmake-tools",
"forcedInclude": [],
"compileCommands": [],
"dotConfig": "${workspaceFolder}/.config",
"mergeConfigurations": true,
"customConfigurationVariables": {
"myVar": "myvalue"
},
"browse": {
"path": [
"${myIncludePath}",
"/usr/include",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db"
}
}
],
"version": 4
}
31 changes: 31 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"C_Cpp.default.compilerPath": "C:/msys64/mingw32/bin/gcc.exe",
"terminal.integrated.profiles.windows": {
"MSYS2": {
"path": "C:\\msys64\\usr\\bin\\bash.exe",
"args": [
"--login",
"-i"
],
"env": {
"MSYSTEM": "MINGW64",
"CHERE_INVOKING": "1",
"MINGW_CHOST": "x86_64-w64-mingw32",
"MINGW_PACKAGE_PREFIX": "mingw-w64-x86_64",
"MSYSTEM_CARCH": "x86_64",
"MSYSTEM_CHOST": "x86_64-w64-mingw32",
"PS1": "\\[\\e]0;\\w\\a\\]\\n\\[\\e[32m\\]\\u@\\h \\[\\e[35m\\]$MSYSTEM\\[\\e[0m\\] \\[\\e[33m\\]\\w\\[\\e[0m\\]\\n\\$",
"MSYSCON": "mintty.exe",
"MSYSTEM_PREFIX": "/mingw64",
"PKG_CONFIG_SYSTEM_INCLUDE_PATH": "/mingw64/include",
"PKG_CONFIG_PATH": "/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig",
"MANPATH": "/mingw64/local/man:/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/share/man",
"INFOPATH": "/mingw64/local/info:/mingw64/share/info:/usr/local/info:/usr/share/info:/usr/info:/share/info",
"ACLOCAL_PATH": "/mingw64/share/aclocal:/usr/share/aclocal",
"PKG_CONFIG_SYSTEM_LIBRARY_PATH": "/mingw64/lib",
"XDG_DATA_DIRS": "/mingw64/share/:/usr/local/share/:/usr/share/",
"PATH": "/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl",
}
}
}
}
3 changes: 0 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ EXTRA_DIST += changes.txt config.h.msys diffscript.pl .gitignore \
# Diagram of evaluator, in three formats because hey why not
EXTRA_DIST += evaluator.ps evaluator.pdf evaluator.svg

# Win32 API compliant graphics routines (unused)
EXTRA_DIST += win32trm.c win32trm.h

# makehelp_SOURCES = makehelp.c

# Make sure pdf built for distributions
Expand Down
25 changes: 0 additions & 25 deletions coms.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ extern int check_wx_stop(int force_yield, int pause_return_value);
#include <unistd.h>
#endif

#ifdef HAVE_TERMIO_H
#ifdef HAVE_WX
#include <termios.h>
#else
#include <termio.h>
#endif
#else
#ifdef HAVE_SGTTY_H
#include <sgtty.h>
#endif
#endif

#ifdef HAVE_GETTIMEOFDAY
#include <sys/time.h>
Expand Down Expand Up @@ -378,15 +367,8 @@ NODE *lwait(NODE *args) {
return(UNBOUND);
#endif*/
#ifndef HAVE_WX
#ifdef WIN32
win32_update_text();
#else
fflush(stdout); /* csls v. 1 p. 7 */
#endif
#else
//doesn't seem to work in WX. now done in wxLogoSleep
//fflush(stdout); /* csls v. 1 p. 7 */
#endif

fix_turtle_shownness();

Expand All @@ -409,13 +391,6 @@ NODE *lwait(NODE *args) {
n = (unsigned int)getint(num) / 60;
sleep(n);
#endif
#else /* unreachable, I think */
if (!setjmp(iblk_buf)) {
input_blocking++;
n = ((unsigned int)getint(num)+30) / 60;
if (n > 0) sleep(n);
}
input_blocking = 0;
#endif /* unix */
}
#endif /* HAVE_WX */
Expand Down
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ AM_COND_IF([X11],
[AC_SEARCH_LIBS(XOpenDisplay, [X11])])

dnl Checks for header files.
AC_CHECK_HEADERS([unistd.h string.h])
AM_COND_IF([WX],,
[AC_CHECK_HEADERS([sgtty.h termio.h termcap.h termlib.h curses.h])])
AC_CHECK_HEADERS([termios.h termio.h termcap.h termlib.h curses.h sys/ioctl.h unistd.h string.h])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
Expand Down
25 changes: 5 additions & 20 deletions error.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@
#include "logo.h"
#include "globals.h"

#ifdef HAVE_TERMIO_H
#ifdef HAVE_WX
#if defined(HAVE_TERMIOS_H)
#include <termios.h>
#else
#elif defined(HAVE_TERMIO_H)
#include <termio.h>
#endif
#else
#ifdef HAVE_SGTTY_H
#include <sgtty.h>
#endif

#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif

#ifdef HAVE_UNISTD_H
Expand Down Expand Up @@ -264,18 +262,12 @@ void memcpy(char *to, char *from, size_t len) {
NODE *lpause(NODE *args) {
NODE *elist = NIL, *val = UNBOUND, *uname = NIL;
int sav_input_blocking;
#ifndef TIOCSTI
jmp_buf sav_iblk;
#endif

if (err_mesg != NIL) err_print(NULL);
ndprintf(stdout, "%t\n", message_texts[PAUS_ING]);
if (inside_evaluator) {
uname = ufun;
ufun = NIL;
#ifndef TIOCSTI
memcpy((char *)(&sav_iblk), (char *)(&iblk_buf), sizeof(jmp_buf));
#endif
sav_input_blocking = input_blocking;
input_blocking = 0;
while (RUNNING) {
Expand All @@ -292,10 +284,6 @@ NODE *lpause(NODE *args) {
val = output_node;
output_node = UNBOUND;
stopping_flag = RUN;
#ifndef TIOCSTI
memcpy((char *)(&iblk_buf), (char *)(&sav_iblk),
sizeof(jmp_buf));
#endif
input_blocking = sav_input_blocking;
if (uname != NIL) {
ufun = uname;
Expand All @@ -307,9 +295,6 @@ NODE *lpause(NODE *args) {
}
}
}
#ifndef TIOCSTI
memcpy((char *)(&iblk_buf), (char *)(&sav_iblk), sizeof(jmp_buf));
#endif
input_blocking = sav_input_blocking;
unblock_input();
if (uname != NIL) {
Expand Down
12 changes: 0 additions & 12 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,6 @@ void debprintline(int line, char *name) {
#define DEB_CONT 0
#endif

#ifdef HAVE_TERMIO_H
#ifdef HAVE_WX
#include <termios.h>
#else
#include <termio.h>
#endif
#else
#ifdef HAVE_SGTTY_H
#include <sgtty.h>
#endif
#endif

#if DEB_STACK
NODE *restname, *restline;
#define save(register) ( debprint2("saving " #register " = %s ", register), \
Expand Down
22 changes: 5 additions & 17 deletions files.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@ int reading_char_now = 0;
#define sysUnGetC ungetc
#endif

#ifdef HAVE_TERMIO_H
#ifdef HAVE_WX
#if defined(HAVE_TERMIOS_H)
#include <termios.h>
#else
#elif defined(HAVE_TERMIO_H)
#include <termio.h>
#endif
#else
#ifdef HAVE_SGTTY_H
#include <sgtty.h>
#endif

#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif

#ifdef HAVE_UNISTD_H
Expand Down Expand Up @@ -466,7 +464,6 @@ void silent_load(NODE *arg, const char *prefix) {
for (cp = load_path; *cp != '\0'; cp++)
if (*cp == '?') *cp = 'Q';
}
/* strcpy(load_path, eight_dot_three(load_path)); */
/* #endif */
}
tmp_stream = loadstream;
Expand Down Expand Up @@ -577,9 +574,6 @@ NODE *lreadchar(NODE *args) {
}
charmode_on();
input_blocking++;
#ifndef TIOCSTI
if (!setjmp(iblk_buf))
#endif
{
#ifdef HAVE_WX
if (interactive && readstream==stdin) {
Expand Down Expand Up @@ -616,9 +610,6 @@ NODE *lreadchars(NODE *args) {
if (stopping_flag == THROWING) return UNBOUND;
charmode_on();
input_blocking++;
#ifndef TIOCSTI
if (!setjmp(iblk_buf))
#endif
{
strhead = malloc((size_t)(c + sizeof(FIXNUM) + 1));
if (strhead == NULL) {
Expand All @@ -642,9 +633,6 @@ NODE *lreadchars(NODE *args) {
setstrrefcnt(strhead, 0);
}
input_blocking = 0;
#ifndef TIOCSTI
if (stopping_flag == THROWING) return(UNBOUND);
#endif
if (c <= 0) {
free(strhead);
return(NIL);
Expand Down
Loading