aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-19 12:38:30 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-19 12:38:30 +0000
commitf41751a60d4e3b884ecc785a3b1c34cbd5fbd69e (patch)
tree46f932f18388e8887522b790199c3c71dbf7317c
parent2a3cf942949522c245ed5525018dc9c205d642b1 (diff)
downloadbusybox-w32-f41751a60d4e3b884ecc785a3b1c34cbd5fbd69e.tar.gz
busybox-w32-f41751a60d4e3b884ecc785a3b1c34cbd5fbd69e.tar.bz2
busybox-w32-f41751a60d4e3b884ecc785a3b1c34cbd5fbd69e.zip
- remove superfluous legacy includes.
This applet should be converted to use llist; __NEED_DLLIST git-svn-id: svn://busybox.net/trunk/busybox@15126 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--editors/ed.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/editors/ed.c b/editors/ed.c
index 0414bfc9d..1ff93c2bb 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -1,3 +1,4 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * Copyright (c) 2002 by David I. Bell 3 * Copyright (c) 2002 by David I. Bell
3 * Permission is granted to use, distribute, or modify this source, 4 * Permission is granted to use, distribute, or modify this source,
@@ -11,11 +12,9 @@
11#include <unistd.h> 12#include <unistd.h>
12#include <fcntl.h> 13#include <fcntl.h>
13#include <string.h> 14#include <string.h>
14#include <memory.h>
15#include <time.h> 15#include <time.h>
16#include <ctype.h> 16#include <ctype.h>
17#include <sys/param.h> 17#include <sys/param.h>
18#include <malloc.h>
19#include "busybox.h" 18#include "busybox.h"
20 19
21#define USERSIZE 1024 /* max line length typed in by user */ 20#define USERSIZE 1024 /* max line length typed in by user */
@@ -321,7 +320,7 @@ static void doCommands(void)
321 bb_error_msg("No file name specified"); 320 bb_error_msg("No file name specified");
322 break; 321 break;
323 } 322 }
324 323
325 writeLines(cp, num1, num2); 324 writeLines(cp, num1, num2);
326 break; 325 break;
327 326
@@ -349,7 +348,7 @@ static void doCommands(void)
349 348
350 printLines(curNum, curNum, FALSE); 349 printLines(curNum, curNum, FALSE);
351 break; 350 break;
352 351
353 case '-': 352 case '-':
354 if (setCurNum(curNum - 1)) 353 if (setCurNum(curNum - 1))
355 printLines(curNum, curNum, FALSE); 354 printLines(curNum, curNum, FALSE);
@@ -672,7 +671,7 @@ static void addLines(int num)
672/* 671/*
673 * Parse a line number argument if it is present. This is a sum 672 * Parse a line number argument if it is present. This is a sum
674 * or difference of numbers, '.', '$', 'x, or a search string. 673 * or difference of numbers, '.', '$', 'x, or a search string.
675 * Returns TRUE if successful (whether or not there was a number). 674 * Returns TRUE if successful (whether or not there was a number).
676 * Returns FALSE if there was a parsing error, with a message output. 675 * Returns FALSE if there was a parsing error, with a message output.
677 * Whether there was a number is returned indirectly, as is the number. 676 * Whether there was a number is returned indirectly, as is the number.
678 * The character pointer which stopped the scan is also returned. 677 * The character pointer which stopped the scan is also returned.
@@ -1141,7 +1140,7 @@ static int insertLine(int num, const char * data, int len)
1141 1140
1142 newLp = (LINE *) malloc(sizeof(LINE) + len - 1); 1141 newLp = (LINE *) malloc(sizeof(LINE) + len - 1);
1143 1142
1144 if (newLp == NULL) 1143 if (newLp == NULL)
1145 { 1144 {
1146 bb_error_msg("Failed to allocate memory for line"); 1145 bb_error_msg("Failed to allocate memory for line");
1147 1146