[PATCH] fix warnings

2012-12-11 Thread Mikulas Patocka
This patch fixes compile warnings * src/filemanager/filegui.c defines macro STATFS but it doesn't use it, it uses statfs function instead. This results in a warning because statfs has this prototype "int statfs(const char *path, struct statfs *buf);", but we pass "struct statvfs" as an argument.

[PATCH 2] Fix build on HP-UX 11.11

2012-12-11 Thread Mikulas Patocka
On Fri, 7 Dec 2012, Andrew Borodin wrote: > On Fri, 7 Dec 2012 02:10:39 +0100 (CET) Mikulas Patocka wrote: > > Fix build on HP-UX 11.11 > > > > HP-UX 11.11 doesn't have strtoll, but it has strtoimax. strtoimax is > > defined as a preprocessor macro, not as a fu

Re: [PATCH] Fix build on HP-UX 11.11

2012-12-07 Thread Mikulas Patocka
On Fri, 7 Dec 2012, Andrew Borodin wrote: > On Fri, 7 Dec 2012 02:10:39 +0100 (CET) Mikulas Patocka wrote: > > Fix build on HP-UX 11.11 > > > > HP-UX 11.11 doesn't have strtoll, but it has strtoimax. strtoimax is > > defined as a preprocessor macro, not as a fu

[PATCH] Fix a crash when F11 is pressed in editor with no filename

2012-12-06 Thread Mikulas Patocka
Hi If you start an editor with no filename ("mc -e") and press F11, it crashes on NULL pointer dereference. This patch fixes the crash. Mikulas Index: mc-4.8.6-test/src/filemanager/usermenu.c === --- mc-4.8.6-test.orig/src/filemana

[PATCH] Fix build on HP-UX 11.11

2012-12-06 Thread Mikulas Patocka
Hi Fix build on HP-UX 11.11 HP-UX 11.11 doesn't have strtoll, but it has strtoimax. strtoimax is defined as a preprocessor macro, not as a function. This patch fixes build: it adds checks for two function strtoll and strtoimax and uses them if detected. BTW. in ./src/vfs/fish/fish.c and ./lib/

Re: [PATCH] full device

2006-12-29 Thread Mikulas Patocka
One more patch fixing two issues: stat.st_blocks may be 64-bit, but Midnight commander truncates it to long If the file has too many blocks, display overflows the right end of the panel (because there is no size_trunc_len when printing block count). Mikulas Another patch: When the device i

[PATCH] full device

2006-12-28 Thread Mikulas Patocka
Another patch: When the device is out of free inodes or blocks, MC will display "No node information" or "No space information" --- actualy when the filesystem declines to report node or space information, it sets total number of blocks/nodes to 0. When it sets number of free inodes/blocks 0,

Re: [PATCH] corrupted free inodes list

2006-12-20 Thread Mikulas Patocka
> Hello Mikulas, > > On Wed, 20 Dec 2006, Mikulas Patocka wrote: > >> I've found on three machines (I wonder that no one noticed it so far) that >> mc displays incorrect information on inode count, for example: > > Which version of MC are you using ? Stock 4.6

[PATCH] corrupted free inodes list

2006-12-20 Thread Mikulas Patocka
Hi I've found on three machines (I wonder that no one noticed it so far) that mc displays incorrect information on inode count, for example: | Filesystem: / | | Device:/dev/md0 | | Type: ext2 | | Free space: 161G (0%) of 55

Re: [patch] Accessing freed memory crash

2006-08-13 Thread Mikulas Patocka
> Hello Mikulas, > > On Sat, 2006-08-12 at 03:35 +0200, Mikulas Patocka wrote: >> I think the code you committed is wrong. Imagine this: you have one event >> in select list and that event is set in select_set. On the first pass, you >> call callback and set retry to

Re: [patch] Accessing freed memory crash

2006-08-12 Thread Mikulas Patocka
On Sat, 12 Aug 2006, Leonard den Ottolander wrote: > Hello Mikulas, > > On Fri, 2006-08-11 at 01:49 +0200, Mikulas Patocka wrote: >> check_selects calls a callback when there is an event on handle. The >> callback itself can remove the event with delete_select_channel -

[patch] Accessing freed memory crash

2006-08-11 Thread Mikulas Patocka
Hi check_selects calls a callback when there is an event on handle. The callback itself can remove the event with delete_select_channel --- when it happens, check_selects accesses defunct p->next pointer and crash may happen. (I reproduced crash on this when inserting sleep(1) somewhere in bac