1
0
mirror of https://github.com/rfivet/uemacs.git synced 2025-11-23 11:41:15 -05:00

Bindable functions take a boolean as flag.

Emphasize which one always return TRUE.
Use mloutfail() to introduce consistency when a function fails with error message.
This commit is contained in:
2021-08-11 17:02:19 +08:00
parent 665d9ca1da
commit 50b727bf7f
31 changed files with 1593 additions and 1789 deletions

39
spawn.c
View File

@@ -1,9 +1,7 @@
/* spawn.c -- implements spawn.h */
#include "spawn.h"
/* spawn.c
*
* Various operating system access commands.
/* Various operating system access commands.
*
* Modified by Petri Kutvonen
*/
@@ -34,13 +32,11 @@
#endif
/*
* Create a subjob with a copy of the command intrepreter in it. When the
/* Create a subjob with a copy of the command intrepreter in it. When the
* command interpreter exits, mark the screen as garbage so that you do a full
* repaint. Bound to "^X C".
*/
int spawncli(int f, int n)
{
BINDABLE( spawncli) {
#if USG | BSD
char *cp;
#endif
@@ -81,9 +77,8 @@ int spawncli(int f, int n)
}
#if BSD | SVR4
int bktoshell(int f, int n)
{ /* suspend MicroEMACS and wait to wake up */
/* suspend MicroEMACS and wait to wake up */
BINDABLE( bktoshell) {
vttidy();
/******************************
int pid;
@@ -103,12 +98,12 @@ void rtfrmshell(void)
}
#endif
/*
* Run a one-liner in a subjob. When the command returns, wait for a single
/* Run a one-liner in a subjob. When the command returns, wait for a single
* character to be typed, then mark the screen as garbage so a full repaint is
* done. Bound to "C-X !".
*/
int spawn( int f, int n) {
BINDABLE( spawn) {
int s ;
char *line ;
@@ -141,13 +136,13 @@ int spawn( int f, int n) {
#endif
}
/*
* Run an external program with arguments. When it returns, wait for a single
/* Run an external program with arguments. When it returns, wait for a single
* character to be typed, then mark the screen as garbage so a full repaint is
* done. Bound to "C-X $".
*/
int execprg( int f, int n) {
BINDABLE( execprg) {
int s ;
char *line ;
@@ -176,11 +171,11 @@ int execprg( int f, int n) {
#endif
}
/*
* Pipe a one line command into a window
/* Pipe a one line command into a window
* Bound to ^X @
*/
int pipecmd( int f, int n) {
BINDABLE( pipecmd) {
int s ; /* return status from CLI */
struct window *wp ; /* pointer to new window */
buffer_p bp ; /* pointer to buffer to zot */
@@ -271,11 +266,11 @@ int pipecmd( int f, int n) {
return TRUE;
}
/*
* filter a buffer through an external DOS program
/* filter a buffer through an external DOS program
* Bound to ^X #
*/
int filter_buffer( int f, int n) {
BINDABLE( filter_buffer) {
int s ; /* return status from CLI */
buffer_p bp ; /* pointer to buffer to zot */
char *mlarg ;