Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Commit

Permalink
Linux fixes and touches
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Jun 23, 2019
1 parent 9fa6cf5 commit 2bb1fd3
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Manuel - Gas Gas Gas.flac: FLAC audio, 44100 Hz, 16-bit, 2 channels
cv.wav: WAVE audio (G.729) 8000 Hz, 0 kbps, 0-bit, 1 channels
2002ado.wad: PWAD, 894 entries at C7A7FDh
(Linux)$ ff /dev/null
$ ff /dev/null
Character device
(Windows)> ff nul
> ff NUL
Character device
```

Expand Down
2 changes: 1 addition & 1 deletion build-clang-cl.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
:: Don't forget setargv_*.obj
::
set t="\"%date% %time%\""
clang-cl src\*.c src\executables\*.c src\etc\*.c src\images\*.c src\documents\*.c src\audio\*.c src\archives\*.c src\vdisk\*.c %1 %2 %3 -DTIMESTAMP=%t% /Zp /o "ff.exe"
clang-cl src\*.c src\executables\*.c src\etc\*.c src\images\*.c src\documents\*.c src\audio\*.c src\archives\*.c src\vdisk\*.c %1 %2 %3 %4 %5 -DTIMESTAMP=%t% /Zp /o "ff.exe"
2 changes: 1 addition & 1 deletion build-clang.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
:: Don't forget setargv_*.obj
::
set t="\"%date% %time%\""
clang src\*.c src\executables\*.c src\etc\*.c src\images\*.c src\documents\*.c src\audio\*.c src\archives\*.c src\vdisk\*.c %1 %2 %3 -std=c99 -fno-stack-protector -fshort-enums -fstrict-enums -fpack-struct=1 -off.exe -DTIMESTAMP=%t%
clang src\*.c src\executables\*.c src\etc\*.c src\images\*.c src\documents\*.c src\audio\*.c src\archives\*.c src\vdisk\*.c %1 %2 %3 %4 %5 -std=c99 -fno-stack-protector -fshort-enums -fstrict-enums -fpack-struct=1 -off.exe -DTIMESTAMP=%t%
2 changes: 1 addition & 1 deletion build-clang.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#T="\"`date +"%Y-%m-%d %H:%M:%S"`\""
clang src/*.c src/executables/*.c src/etc/*.c src/images/*.c src/documents/*.c src/audio/*.c src/archives/*.c src/vdisk/*.c $1 $2 $3 -std=gnu99 -fno-stack-protector -fshort-enums -fstrict-enums -fpack-struct=1 -lm -off
clang src/*.c src/executables/*.c src/etc/*.c src/images/*.c src/documents/*.c src/audio/*.c src/archives/*.c src/vdisk/*.c $1 $2 $3 $4 $5 -std=gnu99 -fno-stack-protector -fshort-enums -fstrict-enums -fpack-struct=1 -lm -off
#-DTIMESTAMP="$T"
2 changes: 1 addition & 1 deletion docs/ff.1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Prepend filename to result, useful while globbing. Default: Off
.IP --
Disables further CLI option settings. Default: Off

.IP -v, --version
.IP --version
Show version screen and exit.

.IP -h, --help
Expand Down
2 changes: 2 additions & 0 deletions src/etc/ms-shllink.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include "../utils.h"
#include "../settings.h"
#include "../ff.h"
Expand Down
4 changes: 4 additions & 0 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ void _printfd(uint64_t l) {
} else if (f >= KB) {
printf("%.1f KB", f / KB);
} else
#ifdef _WIN32
printf("%llu B", l);
#else
printf("%lu B", l);
#endif
}

uint16_t bswap16(uint16_t s) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int _osseek(int pos, int mode);
* e.g. 24554 will result 23K
* l: Value
*/
void _printfd(unsigned long long l);
void _printfd(uint64_t l);
/**
* Prints a line to stdout.
* str: Input string
Expand Down

0 comments on commit 2bb1fd3

Please # to comment.