Fix some EOL handling
This commit is contained in:
+25
-28
@@ -24,38 +24,13 @@
|
||||
#define _GNU_SOURCE
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
// don't try to simply change this, it will not work
|
||||
#define PW_MIN 0
|
||||
#define PW_MAX 54
|
||||
#define PW_MAX1 (PW_MAX + 1)
|
||||
|
||||
#define PW_DICTMAX 31
|
||||
#define PW_DICTMAX1 (PW_DICTMAX + 1)
|
||||
|
||||
#define EXEC_CACHE 128
|
||||
|
||||
#define SPEED_CACHE 128
|
||||
#define SPEED_MAXAGE 4096
|
||||
|
||||
// general buffer size in case the size is unknown at compile-time
|
||||
#define HCBUFSIZ_TINY 0x100
|
||||
#define HCBUFSIZ_LARGE 0x50000
|
||||
|
||||
#define BLOCK_SIZE 64
|
||||
|
||||
#define EXPECTED_ITERATIONS 10000
|
||||
#define NOMINMAX 1
|
||||
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define DEVICES_MAX 128
|
||||
|
||||
#define MAX_CUT_TRIES 4
|
||||
|
||||
#define CEIL(a) ((a - (int) (a)) > 0 ? a + 1 : a)
|
||||
|
||||
#define NOMINMAX 1
|
||||
|
||||
#if defined (__APPLE__)
|
||||
#define __stdcall
|
||||
#endif
|
||||
@@ -81,12 +56,34 @@ but this is nededed for VS compiler which doesn't have inline keyword but has __
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MAYBE_UNUSED __attribute__((unused))
|
||||
|
||||
// config section
|
||||
// do not try to simply change this, it will not work
|
||||
|
||||
#define PW_MIN 0
|
||||
#define PW_MAX 54
|
||||
#define PW_MAX1 (PW_MAX + 1)
|
||||
#define PW_DICTMAX 31
|
||||
#define PW_DICTMAX1 (PW_DICTMAX + 1)
|
||||
|
||||
#define HCBUFSIZ_TINY 0x100
|
||||
#define HCBUFSIZ_LARGE 0x50000
|
||||
|
||||
#define CPT_CACHE 0x20000
|
||||
#define PARAMCNT 64
|
||||
#define DEVICES_MAX 128
|
||||
#define EXEC_CACHE 128
|
||||
#define SPEED_CACHE 128
|
||||
#define SPEED_MAXAGE 4096
|
||||
#define BLOCK_SIZE 64
|
||||
#define EXPECTED_ITERATIONS 10000
|
||||
#define MAX_CUT_TRIES 4
|
||||
|
||||
#if defined (_WIN)
|
||||
#define EOL "\r\n"
|
||||
#else
|
||||
#define EOL "\n"
|
||||
#endif
|
||||
|
||||
#define MAYBE_UNUSED __attribute__((unused))
|
||||
|
||||
#endif // _COMMON_H
|
||||
|
||||
+2
-3
@@ -6,6 +6,8 @@
|
||||
#ifndef _TYPES_H
|
||||
#define _TYPES_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@@ -14,9 +16,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define CPT_BUF 0x20000
|
||||
#define PARAMCNT 64
|
||||
|
||||
#if defined (_WIN)
|
||||
#include <windows.h>
|
||||
#if defined (_BASETSD_H)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define _USAGE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
void usage_mini_print (const char *progname);
|
||||
void usage_big_print (const char *progname);
|
||||
|
||||
Reference in New Issue
Block a user