summaryrefslogtreecommitdiffstats
path: root/bin/ed/buf.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-02-02 06:36:49 +0000
committerimp <imp@FreeBSD.org>2002-02-02 06:36:49 +0000
commit3fc8df52e3856eeac730574d5ae122806dd1e1ef (patch)
tree331e1d7f986e20bcd52361067fc4b66cab14b048 /bin/ed/buf.c
parent5203a0a465a65bd5e6e40b6364bb0dbe05feb7cf (diff)
downloadFreeBSD-src-3fc8df52e3856eeac730574d5ae122806dd1e1ef.zip
FreeBSD-src-3fc8df52e3856eeac730574d5ae122806dd1e1ef.tar.gz
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o gc some #ifdef sun ... #endif code Approved by: arch@, new style(9)
Diffstat (limited to 'bin/ed/buf.c')
-rw-r--r--bin/ed/buf.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/bin/ed/buf.c b/bin/ed/buf.c
index 01f722b..b70346c 100644
--- a/bin/ed/buf.c
+++ b/bin/ed/buf.c
@@ -45,8 +45,7 @@ line_t buffer_head; /* incore buffer */
/* get_sbuf_line: get a line of text from the scratch file; return pointer
to the text */
char *
-get_sbuf_line(lp)
- line_t *lp;
+get_sbuf_line(line_t *lp)
{
static char *sfbuf = NULL; /* buffer */
static int sfbufsz = 0; /* buffer size */
@@ -81,8 +80,7 @@ get_sbuf_line(lp)
/* put_sbuf_line: write a line of text to the scratch file and add a line node
to the editor buffer; return a pointer to the end of the text */
const char *
-put_sbuf_line(cs)
- const char *cs;
+put_sbuf_line(const char *cs)
{
line_t *lp;
int len, ct;
@@ -128,8 +126,7 @@ put_sbuf_line(cs)
/* add_line_node: add a line node in the editor buffer after the current line */
void
-add_line_node(lp)
- line_t *lp;
+add_line_node(line_t *lp)
{
line_t *cp;
@@ -142,8 +139,7 @@ add_line_node(lp)
/* get_line_node_addr: return line number of pointer */
long
-get_line_node_addr(lp)
- line_t *lp;
+get_line_node_addr(line_t *lp)
{
line_t *cp = &buffer_head;
long n = 0;
@@ -160,8 +156,7 @@ get_line_node_addr(lp)
/* get_addressed_line_node: return pointer to a line node in the editor buffer */
line_t *
-get_addressed_line_node(n)
- long n;
+get_addressed_line_node(long n)
{
static line_t *lp = &buffer_head;
static long on = 0;
@@ -196,7 +191,7 @@ char sfn[15] = ""; /* scratch file name */
/* open_sbuf: open scratch file */
int
-open_sbuf()
+open_sbuf(void)
{
int fd = -1;
int u;
@@ -220,7 +215,7 @@ open_sbuf()
/* close_sbuf: close scratch file */
int
-close_sbuf()
+close_sbuf(void)
{
if (sfp) {
if (fclose(sfp) < 0) {
@@ -238,8 +233,7 @@ close_sbuf()
/* quit: remove_lines scratch file and exit */
void
-quit(n)
- int n;
+quit(int n)
{
if (sfp) {
fclose(sfp);
@@ -253,7 +247,7 @@ unsigned char ctab[256]; /* character translation table */
/* init_buffers: open scratch buffer; initialize line queue */
void
-init_buffers()
+init_buffers(void)
{
int i = 0;
@@ -278,11 +272,7 @@ init_buffers()
/* translit_text: translate characters in a string */
char *
-translit_text(s, len, from, to)
- char *s;
- int len;
- int from;
- int to;
+translit_text(char *s, int len, int from, int to)
{
static int i = 0;
OpenPOWER on IntegriCloud