From a1a027b9bd833db5384d7dc65046194018eb8bfa Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Sat, 21 Dec 2019 01:09:25 -0800 Subject: Axe automated header generation. Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code. --- Vector.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'Vector.h') diff --git a/Vector.h b/Vector.h index 0d9f1c2c..7286bf65 100644 --- a/Vector.h +++ b/Vector.h @@ -1,5 +1,3 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_Vector #define HEADER_Vector /* -- cgit v1.2.3 From 7b7822b896af7673b9e13f0f1807e187ef2d4370 Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Wed, 2 Sep 2020 02:38:44 -0500 Subject: Remove superfluous 'extern's from function declarations. Applied via: $ find * -name '*.h' -exec sed -i -r 's/^extern (.+\()/\1/;' {} + Suggested-by: Bert Wesarg --- Vector.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'Vector.h') diff --git a/Vector.h b/Vector.h index 7286bf65..7d1436aa 100644 --- a/Vector.h +++ b/Vector.h @@ -25,42 +25,42 @@ typedef struct Vector_ { } Vector; -extern Vector* Vector_new(ObjectClass* type, bool owner, int size); +Vector* Vector_new(ObjectClass* type, bool owner, int size); -extern void Vector_delete(Vector* this); +void Vector_delete(Vector* this); #ifdef DEBUG -extern int Vector_count(Vector* this); +int Vector_count(Vector* this); #endif -extern void Vector_prune(Vector* this); +void Vector_prune(Vector* this); // If I were to use only one sorting algorithm for both cases, it would probably be this one: /* */ -extern void Vector_quickSort(Vector* this); +void Vector_quickSort(Vector* this); -extern void Vector_insertionSort(Vector* this); +void Vector_insertionSort(Vector* this); -extern void Vector_insert(Vector* this, int idx, void* data_); +void Vector_insert(Vector* this, int idx, void* data_); -extern Object* Vector_take(Vector* this, int idx); +Object* Vector_take(Vector* this, int idx); -extern Object* Vector_remove(Vector* this, int idx); +Object* Vector_remove(Vector* this, int idx); -extern void Vector_moveUp(Vector* this, int idx); +void Vector_moveUp(Vector* this, int idx); -extern void Vector_moveDown(Vector* this, int idx); +void Vector_moveDown(Vector* this, int idx); -extern void Vector_set(Vector* this, int idx, void* data_); +void Vector_set(Vector* this, int idx, void* data_); #ifdef DEBUG -extern Object* Vector_get(Vector* this, int idx); +Object* Vector_get(Vector* this, int idx); #else @@ -70,7 +70,7 @@ extern Object* Vector_get(Vector* this, int idx); #ifdef DEBUG -extern int Vector_size(Vector* this); +int Vector_size(Vector* this); #else @@ -82,9 +82,9 @@ extern int Vector_size(Vector* this); */ -extern void Vector_add(Vector* this, void* data_); +void Vector_add(Vector* this, void* data_); -extern int Vector_indexOf(Vector* this, void* search_, Object_Compare compare); +int Vector_indexOf(Vector* this, void* search_, Object_Compare compare); void Vector_splice(Vector* this, Vector* from); -- cgit v1.2.3