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()
Diffstat (limited to '')
-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++) {
812a92cd22d41aa6f5f85a6b451386422fb4a&follow=1'>Branch off from master with pytest, tox, clickzlg16-778/+779 2018-03-18Flesh out filter types and ownership statuszlg3-82/+144 2018-03-18README.mdown: break line correctlyzlg1-1/+1 2018-03-18add 'playlog' list filterzlg2-2/+9 2018-03-13Update helpers a bitzlg1-2/+9 2018-03-13Make VGSTASH_DB_LOCATION point to a filezlg2-21/+20 2016-11-18Remove settings from helpers.shZe Libertine Gamer1-5/+0 2016-11-15Correct phrasing in README.Ze Libertine Gamer1-4/+4 2016-11-13DerpZe Libertine Gamer1-0/+1 2016-11-03Improve error handling in shell scriptsZe Libertine Gamer4-3/+23 2016-10-24Correct run_again, add recursionZe Libertine Gamer1-0/+4 2016-10-21Add quotes to correct behavior for arglistZe Libertine Gamer1-1/+1 2016-10-14updater.sh: add recursion, error handlingZe Libertine Gamer1-43/+101 2016-10-14Correct pipe-handling behaviorZe Libertine Gamer1-1/+9 2016-10-12Clarify a method to move between platformsZe Libertine Gamer1-2/+5