Discussion:
[fricas-devel] [PATCH] remove unused C function
oldk1331
2018-10-25 10:40:31 UTC
Permalink
This function is strange and never used, so remove it.

diff --git a/src/clef/edible.c b/src/clef/edible.c
index 6bd08c30..22feaec4 100644
--- a/src/clef/edible.c
+++ b/src/clef/edible.c
@@ -557,18 +557,6 @@ flip_canonical(int chann)
Cursor_shape(2);
}

-void
-etc_get_next_line(char * line,int * nr,int fd)
-{
- *nr = read(fd, line, 1024);
- if(*nr == -1) {
- perror("Reading /etc/master");
- }
- if(*nr == 0) {
- fprintf(stderr, "Not found \n");
- }
-}
-
#define etc_whitespace(c) ((c == ' ' || c == '\t')?(1):(0))


diff --git a/src/include/edible.H1 b/src/include/edible.H1
index 808a135f..8d06498d 100644
--- a/src/include/edible.H1
+++ b/src/include/edible.H1
@@ -10,4 +10,3 @@ extern void child_handler(int);
extern void alarm_handler(int);
extern void flip_canonical(int);
extern void flip_raw(int);
-extern void etc_get_next_line(char *, int *, int);
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Waldek Hebisch
2018-10-25 17:15:49 UTC
Permalink
Post by oldk1331
This function is strange and never used, so remove it.
Yes, please commit.
Post by oldk1331
diff --git a/src/clef/edible.c b/src/clef/edible.c
index 6bd08c30..22feaec4 100644
--- a/src/clef/edible.c
+++ b/src/clef/edible.c
@@ -557,18 +557,6 @@ flip_canonical(int chann)
Cursor_shape(2);
}
-void
-etc_get_next_line(char * line,int * nr,int fd)
-{
- *nr = read(fd, line, 1024);
- if(*nr == -1) {
- perror("Reading /etc/master");
- }
- if(*nr == 0) {
- fprintf(stderr, "Not found \n");
- }
-}
-
#define etc_whitespace(c) ((c == ' ' || c == '\t')?(1):(0))
diff --git a/src/include/edible.H1 b/src/include/edible.H1
index 808a135f..8d06498d 100644
--- a/src/include/edible.H1
+++ b/src/include/edible.H1
@@ -10,4 +10,3 @@ extern void child_handler(int);
extern void alarm_handler(int);
extern void flip_canonical(int);
extern void flip_raw(int);
-extern void etc_get_next_line(char *, int *, int);
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...