aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzlg <zlg@zlg.space>2014-04-08 05:08:32 -0500
committerzlg <zlg@zlg.space>2014-04-08 05:08:32 -0500
commit81f406956731e70f190e79ec85cfc38f504240ea (patch)
treeed1a1459ba0758c349a7613b94aca55aa5e05002
parentSolve Exercise 5-15: Case-insensitive sort (diff)
downloadknr-81f406956731e70f190e79ec85cfc38f504240ea.tar.gz
knr-81f406956731e70f190e79ec85cfc38f504240ea.tar.bz2
knr-81f406956731e70f190e79ec85cfc38f504240ea.tar.xz
knr-81f406956731e70f190e79ec85cfc38f504240ea.zip
Remove line_tolower()
-rw-r--r--ch5/5-15_sort-fold.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/ch5/5-15_sort-fold.c b/ch5/5-15_sort-fold.c
index 1eccc34..3b508b9 100644
--- a/ch5/5-15_sort-fold.c
+++ b/ch5/5-15_sort-fold.c
@@ -26,7 +26,6 @@ void writelines(char *lineptr[], int nlines);
void reverse_set(char *lineptr[], int nlines);
void my_qsort(void *lineptr[], int left, int right, int (*comp)(const char *, const char *));
int numcmp(const char *, const char *);
-void line_tolower(char *s);
int istrcmp(const char *, const char *);
void my_qsort(void *v[], int left, int right, int (*comp)(const char *, const char *)) {
@@ -103,14 +102,6 @@ void reverse_set(char *lineptr[], int nlines) {
}
}
-/* Lowercase the entire line */
-void line_tolower(char *s) {
- int i;
- for (i = 0; s[i] != '\0'; i++) {
- s[i] = tolower(s[i]);
- }
-}
-
/* Ignore character case, then send results to qsort */
int istrcmp(const char *s1, const char *s2) {
for ( ; tolower(*s1) == tolower(*s2); s1++, s2++) {