mirror of https://github.com/xzeldon/htop.git
Drop unused macros
This commit is contained in:
parent
edf1b10d2c
commit
ce0fd5f6d8
2
Meter.c
2
Meter.c
|
@ -19,8 +19,6 @@ in the source distribution for its full text.
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#define GRAPH_DELAY (DEFAULT_DELAY/2)
|
|
||||||
|
|
||||||
#define GRAPH_HEIGHT 4 /* Unit: rows (lines) */
|
#define GRAPH_HEIGHT 4 /* Unit: rows (lines) */
|
||||||
|
|
||||||
MeterClass Meter_class = {
|
MeterClass Meter_class = {
|
||||||
|
|
14
XAlloc.c
14
XAlloc.c
|
@ -39,20 +39,6 @@ void* xRealloc(void* ptr, size_t size) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef xAsprintf
|
|
||||||
|
|
||||||
#define xAsprintf(strp, fmt, ...) do { int _r=asprintf(strp, fmt, __VA_ARGS__); if (_r < 0) { fail(); } } while(0)
|
|
||||||
|
|
||||||
#define xSnprintf(fmt, len, ...) do { int _l=len; int _n=snprintf(fmt, _l, __VA_ARGS__); if (!(_n > -1 && _n < _l)) { curs_set(1); endwin(); err(1, NULL); } } while(0)
|
|
||||||
|
|
||||||
#undef xStrdup
|
|
||||||
#undef xStrdup_
|
|
||||||
#ifdef NDEBUG
|
|
||||||
# define xStrdup_ xStrdup
|
|
||||||
#else
|
|
||||||
# define xStrdup(str_) (assert(str_), xStrdup_(str_))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char* xStrdup_(const char* str) {
|
char* xStrdup_(const char* str) {
|
||||||
char* data = strdup(str);
|
char* data = strdup(str);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
|
Loading…
Reference in New Issue