diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-07-28 10:09:46 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-07-28 10:09:46 +0000 |
commit | 2c71c9d92117f7f1fe0d5bd6fe74922e50be0c86 (patch) | |
tree | 6581f8e2c781693a75e6eabb32df88f8299fe1a2 /Build/source/texk/mendexk/sort.c | |
parent | bb3913a1553c1213f93e6f10185f770cde5ae901 (diff) |
mendexk: Use Nelson Beebe's qqsort() instead of qsort()
Handle input files with Dos/Windows (CRLF) line endings (from W32TeX)
Always use KPATHSEA. Use xmalloc() and xstrdup()
git-svn-id: svn://tug.org/texlive/trunk@27216 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk/sort.c')
-rw-r--r-- | Build/source/texk/mendexk/sort.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Build/source/texk/mendexk/sort.c b/Build/source/texk/mendexk/sort.c index f6eccbde304..7ec44785f20 100644 --- a/Build/source/texk/mendexk/sort.c +++ b/Build/source/texk/mendexk/sort.c @@ -2,7 +2,9 @@ #include <stdlib.h> #include <string.h> +#include <kpathsea/config.h> #include "mendex.h" +#include "qsort.h" #include "exkana.h" #include "exvar.h" @@ -155,7 +157,7 @@ void pagesort(struct index *ind, int num) for (i=0;i<num;i++) { if (ind[i].num==0) continue; - buff=malloc(sizeof(struct page)*(ind[i].num+1)); + buff=xmalloc(sizeof(struct page)*(ind[i].num+1)); for (j=0;j<=ind[i].num;j++) { buff[j]=ind[i].p[j]; } |