Article View: comp.std.c
Article #4264Re: Sorting records that include binary data
From: Dann Corbit
Date: Sun, 22 Oct 1995 03:49
Date: Sun, 22 Oct 1995 03:49
15 lines
1142 bytes
1142 bytes
In article <855048191.100662706@deepthnk.kiwi.gen.nz>, nvtuan@deepthnk.kiwi.gen.nz says... > >Hi everyone > >Does anyone know of a utility/program/package/script that would allow the >sorting of a file with records that contain a mixture of character and binary >data - the sort fields are character-based.? If such a jewel exists, how can >I get hold of it please? You can use qsort() to sort the data. If all the keys are character, you can use strcmp() strncmp() or the like in the comparison function. When you open the file, open it as a binary file. -- The opinions expressed in this message are my own personal views and do not reflect the official views of Microsoft Corporation.
Technical Details
Message-ID:
<46cevf$emc@news2100.microsoft.com>Path:
arc1-ca.pugleaf.net!news.microsoft.com!newsReferences:
<855048191.100662706@deepthnk.kiwi.gen.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.microsoft.com!news From: a-cnadc@microsoft.com (Dann Corbit) Newsgroups: comp.std.c Subject: Re: Sorting records that include binary data Date: 22 Oct 1995 03:49:03 GMT Organization: Microsoft Corporation Distribution: world Message-ID: <46cevf$emc@news2100.microsoft.com> References: <855048191.100662706@deepthnk.kiwi.gen.nz> NNTP-Posting-Host: 157.57.171.202 Mime-Version: 1.0 X-Newsreader: WinVN 0.93.14