mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 21:01:12 +08:00
ANSI-fication and minor cleanup of old OS-9 files.
This commit is contained in:
parent
80ca9e1811
commit
76ec5adba6
25
src/os9.h
25
src/os9.h
@ -1,10 +1,25 @@
|
|||||||
/* $Revision: 1.1 $
|
/* Editline system header file for OS-9 (on 68k).
|
||||||
**
|
*
|
||||||
** Editline system header file for OS-9 (on 68k).
|
* Copyright (c) 1992, 1993 Simmule Turner and Rich Salz. All rights reserved.
|
||||||
*/
|
*
|
||||||
|
* This software is not subject to any license of the American Telephone
|
||||||
|
* and Telegraph Company or of the Regents of the University of California.
|
||||||
|
*
|
||||||
|
* Permission is granted to anyone to use this software for any purpose on
|
||||||
|
* any computer system, and to alter it and redistribute it freely, subject
|
||||||
|
* to the following restrictions:
|
||||||
|
* 1. The authors are not responsible for the consequences of use of this
|
||||||
|
* software, no matter how awful, even if they arise from flaws in it.
|
||||||
|
* 2. The origin of this software must not be misrepresented, either by
|
||||||
|
* explicit claim or by omission. Since few users ever read sources,
|
||||||
|
* credits must appear in the documentation.
|
||||||
|
* 3. Altered versions must be plainly marked as such, and must not be
|
||||||
|
* misrepresented as being the original software. Since few users
|
||||||
|
* ever read sources, credits must appear in the documentation.
|
||||||
|
* 4. This notice may not be removed or altered.
|
||||||
|
*/
|
||||||
|
|
||||||
#define CRLF "\r\l"
|
#define CRLF "\r\l"
|
||||||
#define FORWARD extern
|
|
||||||
|
|
||||||
#include <dir.h>
|
#include <dir.h>
|
||||||
typedef struct direct DIRENTRY;
|
typedef struct direct DIRENTRY;
|
||||||
|
49
src/sysos9.c
49
src/sysos9.c
@ -1,20 +1,32 @@
|
|||||||
/* $Revision: 1.1 $
|
/* OS-9 (on 68k) system-dependant routines for editline library.
|
||||||
**
|
*
|
||||||
** OS-9 system-dependant routines for editline library.
|
* Copyright (c) 1992, 1993 Simmule Turner and Rich Salz. All rights reserved.
|
||||||
*/
|
*
|
||||||
|
* This software is not subject to any license of the American Telephone
|
||||||
|
* and Telegraph Company or of the Regents of the University of California.
|
||||||
|
*
|
||||||
|
* Permission is granted to anyone to use this software for any purpose on
|
||||||
|
* any computer system, and to alter it and redistribute it freely, subject
|
||||||
|
* to the following restrictions:
|
||||||
|
* 1. The authors are not responsible for the consequences of use of this
|
||||||
|
* software, no matter how awful, even if they arise from flaws in it.
|
||||||
|
* 2. The origin of this software must not be misrepresented, either by
|
||||||
|
* explicit claim or by omission. Since few users ever read sources,
|
||||||
|
* credits must appear in the documentation.
|
||||||
|
* 3. Altered versions must be plainly marked as such, and must not be
|
||||||
|
* misrepresented as being the original software. Since few users
|
||||||
|
* ever read sources, credits must appear in the documentation.
|
||||||
|
* 4. This notice may not be removed or altered.
|
||||||
|
*/
|
||||||
#include "editline.h"
|
#include "editline.h"
|
||||||
#include <sgstat.h>
|
#include <sgstat.h>
|
||||||
#include <modes.h>
|
#include <modes.h>
|
||||||
|
|
||||||
|
void rl_ttyset(int Reset)
|
||||||
void
|
|
||||||
rl_ttyset(Reset)
|
|
||||||
int Reset;
|
|
||||||
{
|
{
|
||||||
static struct sgbuf old;
|
static struct sgbuf old;
|
||||||
struct sgbuf new;
|
struct sgbuf new;
|
||||||
|
|
||||||
|
|
||||||
if (Reset == 0) {
|
if (Reset == 0) {
|
||||||
_gs_opt(0, &old);
|
_gs_opt(0, &old);
|
||||||
_gs_opt(0, &new);
|
_gs_opt(0, &new);
|
||||||
@ -33,14 +45,21 @@ rl_ttyset(Reset)
|
|||||||
rl_intr = old.sg_kbich;
|
rl_intr = old.sg_kbich;
|
||||||
rl_quit = -1;
|
rl_quit = -1;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
_ss_opt(0, &old);
|
_ss_opt(0, &old);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void rl_add_slash(char *path, char *p)
|
||||||
rl_add_slash(path, p)
|
|
||||||
char *path;
|
|
||||||
char *p;
|
|
||||||
{
|
{
|
||||||
(void)strcat(p, access(path, S_IREAD | S_IFDIR) ? " " : "/");
|
strcat(p, access(path, S_IREAD | S_IFDIR) ? " " : "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Local Variables:
|
||||||
|
* version-control: t
|
||||||
|
* indent-tabs-mode: t
|
||||||
|
* c-file-style: "ellemtel"
|
||||||
|
* c-basic-offset: 4
|
||||||
|
* End:
|
||||||
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user