Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.shell > #885
| From | Uno <Uno@example.invalid> |
|---|---|
| Newsgroups | comp.unix.shell, comp.lang.c |
| Subject | Re: bdiff |
| Date | 2011-06-08 21:59 -0600 |
| Message-ID | <95aup2FneqU1@mid.individual.net> (permalink) |
| References | <94mfhcFngqU1@mid.individual.net> <slrniuf4u1.dhq.hjp-usenet2@hrunkner.hjp.at> <94tsbkFe3nU1@mid.individual.net> <slrniujsih.eni.hjp-usenet2@hrunkner.hjp.at> |
Cross-posted to 2 groups.
On 06/04/2011 02:52 AM, Peter J. Holzer wrote:
> On 2011-06-04 04:58, Uno<Uno@example.invalid> wrote:
>> On 06/02/2011 07:44 AM, Peter J. Holzer wrote:
>>> So, back in the mid 1990's I wrote bdiff (binary diff):
>>> http://www.hjp.at/programs/bdiff/
>>>
>>> I guess I should dust it off, write a man-page and try to get it added
>>> to some linux distribution. But I very rarely need it myself.
> [...]
>> So I downloaded your software, extracted it on a thumbdrive, compiled
>> it, told ubuntu to run it, and it told me I don't have permission.
>>
>> $ sudo chmod 777 bdiff
>> $ ls -l
>>
>> -rw-r--r-- 1 dan dan 12414 2011-06-02 16:29 bdiff
>>
>> That was my last try with that executable. So I tried it again.
>>
>> $ pwd
>> /media/KINGSTON/bdiff-1.0
> ^^^^^^^^^^^^^^^^
>
> What kind of file system is this and how is it mounted?
>
>> $ cc -Wall -Wextra bdiff.c -o bdiff2
>> bdiff.c: In function ‘readfile’:
>> bdiff.c:98: warning: comparison between signed and unsigned integer
>> expressions
>
> The warnings are harmless, AFAICS, and partially misleading (comparison
> between size_t and -1 is well-defined as long as sizeof(size_t)>=
> sizeof(int), which is pretty much guaranteed).
>
> hp
I want to pursue this on the C side for a bit. [x-posted to clc]
$ pwd
/home/dan/source/bdiff-1.0
$ cc -Wall -Wextra cmp1.c -o cmp
cmp1.c: In function ‘main’:
cmp1.c:12: warning: comparison is always true due to limited range of
data type
cmp1.c:17: warning: implicit declaration of function ‘close’
cmp1.c:18: error: expected declaration or statement at end of input
$ cat cmp1.c
#include <stdio.h>
int main(void)
{
unsigned char c;
long counter = 0;
FILE *fp;
fp=fopen("shoulder.wmv", "rb+");
while ((c = fgetc(fp)) != EOF)
{
counter++;
}
printf("Counter reached %ld\n", counter);
close (fp);
return 0;
// cc -Wall -Wextra cmp1.c -o cmp
$
What obvious thing am I missing here?
--
Uno
Back to comp.unix.shell | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
variable-length strings Uno <Uno@example.invalid> - 2011-06-01 03:36 -0600
Re: variable-length strings ccc31807 <cartercc@gmail.com> - 2011-06-01 07:13 -0700
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-02 10:54 -0600
Re: variable-length strings "George Mpouras" <nospam.gravitalsun@hotmail.com.nospam> - 2011-06-01 17:01 +0300
Re: variable-length strings "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-02 15:33 +0200
Re: variable-length strings "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-02 15:44 +0200
Re: variable-length strings Willem <willem@toad.stack.nl> - 2011-06-02 14:19 +0000
cmp (was: variable-length strings) "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-02 18:15 +0200
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-03 23:21 -0600
Re: variable-length strings "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2011-06-04 02:43 -0400
Re: variable-length strings bonomi@host122.r-bonomi.com (Robert Bonomi) - 2011-06-03 11:08 -0500
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-04 00:03 -0600
Re: variable-length strings pacman@kosh.dhis.org (Alan Curry) - 2011-06-04 20:18 +0000
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-07 23:00 -0600
cmp (was: variable-length strings) "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-04 10:29 +0200
Re: cmp Uno <Uno@example.invalid> - 2011-06-07 22:38 -0600
Re: cmp pacman@kosh.dhis.org (Alan Curry) - 2011-06-08 05:22 +0000
Re: cmp Uno <Uno@example.invalid> - 2011-06-09 16:10 -0600
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-03 22:58 -0600
bdiff (was: variable-length strings) "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-04 10:52 +0200
Re: bdiff Uno <Uno@example.invalid> - 2011-06-08 21:59 -0600
Re: bdiff Ian Collins <ian-news@hotmail.com> - 2011-06-09 16:08 +1200
Re: bdiff Uno <Uno@example.invalid> - 2011-06-08 22:20 -0600
Re: bdiff Uno <Uno@example.invalid> - 2011-06-09 02:57 -0600
Re: bdiff Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-06-09 11:10 +0200
Re: bdiff bonomi@host122.r-bonomi.com (Robert Bonomi) - 2011-06-19 06:10 -0500
Re: bdiff Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-09 07:13 -0400
Re: bdiff Uno <Uno@example.invalid> - 2011-06-09 13:30 -0600
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-03 23:11 -0600
Re: variable-length strings "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-04 10:55 +0200
csiph-web