From 76ec5adba69549b00976065b02b0481cdba098e8 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 3 Aug 2010 00:26:06 +0200 Subject: [PATCH] ANSI-fication and minor cleanup of old OS-9 files. --- src/os9.h | 25 ++++++++++++++++++++----- src/sysos9.c | 49 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/src/os9.h b/src/os9.h index 7bb7cf3..826e0e2 100644 --- a/src/os9.h +++ b/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 FORWARD extern #include typedef struct direct DIRENTRY; diff --git a/src/sysos9.c b/src/sysos9.c index fd23aa4..b69ed07 100644 --- a/src/sysos9.c +++ b/src/sysos9.c @@ -1,20 +1,32 @@ -/* $Revision: 1.1 $ -** -** OS-9 system-dependant routines for editline library. -*/ +/* OS-9 (on 68k) 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 #include - -void -rl_ttyset(Reset) - int Reset; +void rl_ttyset(int Reset) { static struct sgbuf old; struct sgbuf new; - if (Reset == 0) { _gs_opt(0, &old); _gs_opt(0, &new); @@ -33,14 +45,21 @@ rl_ttyset(Reset) rl_intr = old.sg_kbich; rl_quit = -1; } - else + else { _ss_opt(0, &old); + } } -void -rl_add_slash(path, p) - char *path; - char *p; +void rl_add_slash(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: + */