diff --git a/autogen.py b/autogen.py index 9afc512..833a151 100644 --- a/autogen.py +++ b/autogen.py @@ -1,47 +1,100 @@ # A script that automatically generates code for code coverage, updates tests # and Makefiles, and creates necessary directories +import argparse import os -import sys import re +import shutil import subprocess +import sys +from typing import List, Text -# Make sure we have the specified directory -def assert_dir(dir): - if not os.path.exists(dir): - os.makedirs(dir) +# Config Script Configuration +# Directories Names for directories +# Output Where the outputted code is to be put +# Build Where the build objects are to be located +# Compiler Compiler Configurations +# Compilation Tests, code coverage and flags +# Macro Expansion Configuration for the code expansion +# Collections All collections +# +# Variables marked as const are to not be modified -# Compiler settings +# Directories + +# Output directory +# In this directory it is assumed that the following files and directories are +# included: main.c, unt folder +OUTPUT_DIR = './tests' +# All libraries +ALL_LIBS = ['CMC', 'SAC', 'TSC'] +# Directory mapping +DIR_MAP = {'HEADER': 'include', 'SOURCE': 'src'} +# File extension mapping +EXT_MAP = {'HEADER': 'h', 'SOURCE': 'c'} +# Where compilation objects will be outputted +BUILD_DIR = f'{OUTPUT_DIR}/build' +# const +INCLUDE_DIR = f"{OUTPUT_DIR}/{DIR_MAP['HEADER']}" +# const +SRC_DIR = f"{OUTPUT_DIR}/{DIR_MAP['SOURCE']}" +# Where object files .o go +OBJ_DIR = f'{BUILD_DIR}/obj' +# The name of the main test executable +TEST_EXE = f'{OUTPUT_DIR}/main.exe' + +# Compiler + +# Compilation CC = 'gcc' +# Compilation Flags +CFLAGS = ['-Wall', '-Werror'] +# Coverage Flags +CVFLAGS = ['--coverage', '-O0'] +# Include to the main Library +# const INCLUDE = '-I ./src' +# Include to the test file headers +# const +TINCLUDE = f'-I {INCLUDE_DIR}' + +# Macro expansion + # -E Only preprocessor # -P No linemarkers # -C Keep comments, except those inside macros (for UNIQUE_FLAG) -FLAGS = '-E -P -C' - -# Used to delimiter where the actual code starts and ends -# Used by regex -# Needs to be a valid C comment +# const +EXPAND_FLAGS = '-E -P -C' +# Used to delimiter where the actual code starts and ends. Used by regex. +# Needs to be a valid C comment. UNIQUE_FLAG = '// C_MACRO_COLLECTIONS_CODE' - # Temporary file used to expand the macros TMP_FILE = './main.c' -# Output directory -# In this directory it is assumed that the following files and folders are -# included: main.c, unt folder -OUTPUT_DIR = './tests' +# Just a realy helpfull overview +CONFIG = f'''Directory Settings + OUTPUT_DIR = {OUTPUT_DIR} + ALL_LIBS = {ALL_LIBS} + DIR_MAP = {DIR_MAP} + EXT_MAP = {EXT_MAP} + BUILD_DIR = {BUILD_DIR} + INCLUDE_DIR = {INCLUDE_DIR} + SRC_DIR = {SRC_DIR} + OBJ_DIR = {OBJ_DIR} +Compiler Settings + CC = {CC} + CFLAGS = {CFLAGS} + CVFLAGS = {CVFLAGS} + INCLUDE = {INCLUDE} + TINCLUDE = {TINCLUDE} +Macro Expansion + EXPAND_FLAGS = {EXPAND_FLAGS} + UNIQUE_FLAG = {UNIQUE_FLAG} + TMP_FILE = {TMP_FILE}''' -# All libraries -ALL_LIBS = ['CMC', 'SAC', 'TSC'] -# Directory mapping -DIR_MAP = {'HEADER': 'include', 'SOURCE': 'src'} - -# File extension mapping -EXT_MAP = {'HEADER': 'h', 'SOURCE': 'c'} - -collections = [ +# All collections that can be used for testing +COLLECTIONS = [ # header, library, collection, pfx, sname, size, key, val {'h': '"cmc/bitset.h"', 'LIB': 'CMC', 'COLLECTION': 'BITSET', 'PFX': 'bs', 'SNAME': 'bitset', 'SIZE': '', 'K': '', 'V': '' }, {'h': '"cmc/deque.h"', 'LIB': 'CMC', 'COLLECTION': 'DEQUE', 'PFX': 'd', 'SNAME': 'deque', 'SIZE': '', 'K': '', 'V': 'size_t'}, @@ -61,164 +114,279 @@ collections = [ {'h': '"cmc/treeset.h"', 'LIB': 'CMC', 'COLLECTION': 'TREESET', 'PFX': 'ts', 'SNAME': 'treeset', 'SIZE': '', 'K': '', 'V': 'size_t'} ] -# Create output directory -assert_dir(OUTPUT_DIR) -# include and src -for dir in DIR_MAP.values(): - assert_dir(f'{OUTPUT_DIR}/{dir}') +def execute_command(commands: List[Text]): + print(' '.join(commands)) + subprocess.run(commands, shell=True) -# For each library, create a folder for include and src -for lib in ALL_LIBS: + +def assert_executable(program: Text): + ''' + Asserts that a given program is installed and available in PATH + ''' + if shutil.which(program) is None: + raise Exception(f'The required executable {program} was not found in your path') + + +def assert_dir(dir: Text): + ''' + Given a string 'dir' that is a path to a directory, make sure that it exists. + ''' + if not os.path.exists(dir): + os.makedirs(dir) + + +def assert_structure(): + ''' + Git might not commit some required directories. This function asserts that they exist. + ''' + assert_dir(OUTPUT_DIR) + + # include and src for dir in DIR_MAP.values(): - assert_dir(f'{OUTPUT_DIR}/{dir}/{lib.lower()}') + assert_dir(f'{OUTPUT_DIR}/{dir}') -# Generate Header and Source separately -for ftype in ['HEADER', 'SOURCE']: - for data in collections: - file = open(TMP_FILE, 'w') + # For each library, create a directory for include and src + for lib in ALL_LIBS: + for dir in DIR_MAP.values(): + assert_dir(f'{OUTPUT_DIR}/{dir}/{lib.lower()}') - file.write( - f''' - #include "macro_collections.h" + assert_dir(BUILD_DIR) + assert_dir(OBJ_DIR) - {UNIQUE_FLAG} + for lib in ALL_LIBS: + assert_dir(f'{OBJ_DIR}/{lib.lower()}') - C_MACRO_COLLECTIONS_ALL_{ftype}({data['LIB']}, {data['COLLECTION']}, ({', '.join([data['PFX'], data['SNAME'], data['SIZE'], data['K'], data['V']])})) - {UNIQUE_FLAG} - ''') +def clean_build(): + execute_command(['find', BUILD_DIR, '-type', 'f', '-delete']) + execute_command(['find', '.', '-iname', '*.gcov', '-type', 'f', '-delete']) - file.flush() - file.close() - result = subprocess.getoutput(f'{CC} {FLAGS} {INCLUDE} {TMP_FILE}') +def expand_code(): + # Generate Header and Source separately + for ftype in ['HEADER', 'SOURCE']: + for data in COLLECTIONS: + file = open(TMP_FILE, 'w') - # (?s) makes '.' match anything, even '\n' - match = re.search(fr'(?s){UNIQUE_FLAG}(?P.+){UNIQUE_FLAG}', result) - - if match is None: - os.remove(TMP_FILE) - print('Didn\'t match FLAG. Probably because compilation failed.', file=sys.stderr) - exit(1) - - file = open(f'{OUTPUT_DIR}/{DIR_MAP[ftype]}/{data["LIB"].lower()}/{data["SNAME"]}.{EXT_MAP[ftype]}', 'w') - - if ftype == 'HEADER': file.write( f''' - #ifndef CMC_{data['LIB']}_{data['COLLECTION']}_TEST_H - #define CMC_{data['LIB']}_{data['COLLECTION']}_TEST_H - #include "macro_collections.h" - {match.group('code')} - #endif /* CMC_{data['LIB']}_{data['COLLECTION']}_TEST_H */ - ''') - else: - file.write( - f''' - #include {data["h"]} + {UNIQUE_FLAG} - {match.group("code")} + C_MACRO_COLLECTIONS_ALL_{ftype}({data['LIB']}, {data['COLLECTION']}, ({', '.join([data['PFX'], data['SNAME'], data['SIZE'], data['K'], data['V']])})) + + {UNIQUE_FLAG} ''') - file.flush() - file.close() + file.flush() + file.close() - print(f'Generated {data["h"]: >20} -> {OUTPUT_DIR}/{DIR_MAP[ftype]}/{data["LIB"].lower()}/{data["SNAME"]}.{EXT_MAP[ftype]}') + result = subprocess.getoutput(f'{CC} {EXPAND_FLAGS} {INCLUDE} {TMP_FILE}') -os.remove(TMP_FILE) + # (?s) makes '.' match anything, even '\n' + match = re.search(fr'(?s){UNIQUE_FLAG}(?P.+){UNIQUE_FLAG}', result) -# Format all files -from shutil import which + if match is None: + os.remove(TMP_FILE) + print('Didn\'t match FLAG. Probably because compilation failed.', file=sys.stderr) + exit(1) -if which('clang-format') is not None: - print('clang-format found. Formating files...') + file = open(f'{OUTPUT_DIR}/{DIR_MAP[ftype]}/{data["LIB"].lower()}/{data["SNAME"]}.{EXT_MAP[ftype]}', 'w') + if ftype == 'HEADER': + file.write( + f''' + #ifndef CMC_{data['LIB']}_{data['COLLECTION']}_TEST_H + #define CMC_{data['LIB']}_{data['COLLECTION']}_TEST_H + + #include "macro_collections.h" + {match.group('code')} + + #endif /* CMC_{data['LIB']}_{data['COLLECTION']}_TEST_H */ + ''') + else: + file.write( + f''' + #include {data["h"]} + + {match.group("code")} + ''') + + file.flush() + file.close() + + print(f'Generated {data["h"]: >20} -> {OUTPUT_DIR}/{DIR_MAP[ftype]}/{data["LIB"].lower()}/{data["SNAME"]}.{EXT_MAP[ftype]}') + + os.remove(TMP_FILE) + + +def format_expand(): cmd = ['clang-format', '--style=file', '--verbose', '-i'] dirs_to_format = [f'{OUTPUT_DIR}/{DIR_MAP[ftype]}/{lib.lower()}/*.{EXT_MAP[ftype]}' for ftype in DIR_MAP.keys() for lib in ALL_LIBS] - cmd.extend(dirs_to_format) - subprocess.call(cmd) -else: - print('clang-format not found. Skipping code formatting...') + execute_command(cmd) -# Makefile -# Contains many usefull things dealing with tests, code coverage and formatting -BUILD_DIR = f'{OUTPUT_DIR}/build' -OBJ_DIR = f'{BUILD_DIR}/obj' -INCLUDE_DIR = f"{OUTPUT_DIR}/{DIR_MAP['HEADER']}" -SRC_DIR = f"{OUTPUT_DIR}/{DIR_MAP['SOURCE']}" -assert_dir(BUILD_DIR) -assert_dir(OBJ_DIR) +def format_code(source: bool, tests: bool): + if source: + execute_command(['find', './src/', '-iname', '*.h', '|', 'xargs', 'clang-format', '--style=file', '--verbose', '-i']) + if tests: + execute_command(['find', './tests/', '-iname', '*.c', '-o', '-iname', '*.h', '|', 'xargs', 'clang-format', '--style=file', '--verbose', '-i']) -for lib in ALL_LIBS: - assert_dir(f'{OBJ_DIR}/{lib.lower()}') -print('Updating Makefile...') +def build_tests(with_coverage: bool): + cflags = CFLAGS.copy() -file = open(f'Makefile', 'w') + if with_coverage: + cflags += CVFLAGS -file.write(f'''# This file was generated by a Python script -CC = {CC} -CFLAGS = -std=c11 -Wall -Wextra -CFLAGS += -Wno-missing-braces -DCMC_TEST_COLOR -CVFLAGS = --coverage -O0 -g3 -INCLUDE = {INCLUDE_DIR} -I src + print("WIP") -# Runs the script to update tests, run all tests and code coverage -all: script coverage -tests: script build -\t{OUTPUT_DIR}/main.exe +def run_tests(): + execute_command([TEST_EXE]) -# Like build but with coverage -coverage: {' '.join([f'{OBJ_DIR}/{data["LIB"].lower()}/{data["SNAME"]}.o' for data in collections])} {OBJ_DIR}/main.o -\t$(CC) $^ -o {OUTPUT_DIR}/main.exe $(CFLAGS) $(CVFLAGS) -\t{OUTPUT_DIR}/main.exe -\tgcov {OBJ_DIR}/main.o {' '.join([f'{OBJ_DIR}/{data["LIB"].lower()}/{data["SNAME"]}.o' for data in collections])} -# Run without coverage -run: build -\t{OUTPUT_DIR}/main.exe +def unused(): + # Makefile + # Contains many usefull things dealing with tests, code coverage and formatting -script: -\tpython autogen.py + print('Updating Makefile...') -clean: -\tfind {BUILD_DIR} -type f -delete -\trm *.gcov + file = open(f'Makefile', 'w') -# No coverage build -build: {' '.join([f'{OBJ_DIR}/{data["LIB"].lower()}/{data["SNAME"]}.o' for data in collections])} {OBJ_DIR}/main.o -\t$(CC) $^ -o {OUTPUT_DIR}/main.exe $(CFLAGS) + file.write(f'''# This file was generated by a Python script + CC = {CC} + CFLAGS = -std=c11 -Wall -Wextra + CFLAGS += -Wno-missing-braces -DCMC_TEST_COLOR + CVFLAGS = --coverage -O0 -g3 + INCLUDE = {INCLUDE_DIR} -I src -{OBJ_DIR}/main.o: {OUTPUT_DIR}/main.c -\t$(CC) -c $^ -o $@ -I $(INCLUDE) $(CFLAGS) -''') + # Runs the script to update tests, run all tests and code coverage + all: script coverage -# Code formatting -file.write(''' -fmt_all: fmt_src fmt_tests + tests: script build + \t{OUTPUT_DIR}/main.exe -fmt_src: FORCE - find ./src/ -iname *.h | xargs clang-format --style=file --verbose -i + # Like build but with coverage + coverage: {' '.join([f'{OBJ_DIR}/{data["LIB"].lower()}/{data["SNAME"]}.o' for data in COLLECTIONS])} {OBJ_DIR}/main.o + \t$(CC) $^ -o {OUTPUT_DIR}/main.exe $(CFLAGS) $(CVFLAGS) + \t{OUTPUT_DIR}/main.exe + \tgcov {OBJ_DIR}/main.o {' '.join([f'{OBJ_DIR}/{data["LIB"].lower()}/{data["SNAME"]}.o' for data in COLLECTIONS])} -fmt_tests: FORCE - find ./tests/ -iname *.c -o -iname *.h | xargs clang-format --style=file --verbose -i + # Run without coverage + run: build + \t{OUTPUT_DIR}/main.exe -.PHONY FORCE: + script: + \tpython autogen.py -''') + clean: + \tfind {BUILD_DIR} -type f -delete + \trm *.gcov -for data in collections: - file.write(f''' -{OBJ_DIR}/{data['LIB'].lower()}/{data['SNAME']}.o: {SRC_DIR}/{data['LIB'].lower()}/{data['SNAME']}.c {INCLUDE_DIR}/{data['LIB'].lower()}/{data['SNAME']}.h -\t$(CC) -c $< -o $@ -I $(INCLUDE) $(CFLAGS) $(CVFLAGS) -''') + # No coverage build + build: {' '.join([f'{OBJ_DIR}/{data["LIB"].lower()}/{data["SNAME"]}.o' for data in COLLECTIONS])} {OBJ_DIR}/main.o + \t$(CC) $^ -o {OUTPUT_DIR}/main.exe $(CFLAGS) -file.close() + {OBJ_DIR}/main.o: {OUTPUT_DIR}/main.c + \t$(CC) -c $^ -o $@ -I $(INCLUDE) $(CFLAGS) + ''') -print('\nDone') + for data in COLLECTIONS: + file.write(f''' + {OBJ_DIR}/{data['LIB'].lower()}/{data['SNAME']}.o: {SRC_DIR}/{data['LIB'].lower()}/{data['SNAME']}.c {INCLUDE_DIR}/{data['LIB'].lower()}/{data['SNAME']}.h + \t$(CC) -c $< -o $@ -I $(INCLUDE) $(CFLAGS) $(CVFLAGS) + ''') + + file.close() + print('\nDone') + + +if __name__ == '__main__': + p = argparse.ArgumentParser('autogen.py', usage='%(prog)s [options]') + + p.add_argument('-sc', '--show-config', + help='Displays the current configuration', + action='store_true', + dest='config') + + tests = p.add_argument_group('tests', 'For dealing with tests') + + tests.add_argument('-c', '--clean', + help='Cleans all build objects', + default=False, + action='store_true', + dest='clean') + tests.add_argument('-e', '--expand', + help='Expands the header and source files', + default=False, + action='store_true', + dest='expand') + tests.add_argument('-nf', '--no-format', + help='Does not format the output of expand. Can be used when you might not have clang-format', + default=False, + action='store_true', + dest='noformat') + tests.add_argument('-r', '--run', + help='Runs tests without code coverage', + default=False, + action='store_true', + dest='run') + tests.add_argument('-cv', '--coverage', + help='Compiles and runs tests with code coverage', + default=False, + action='store_true', + dest='coverage') + tests.add_argument('-rr', '--rerun', + help='Builds tests without code coverage and runs it', + default=False, + action='store_true', + dest='rerun') + + source = p.add_argument_group('source', 'For dealing with the source files and formatting') + + source.add_argument('-fs', '--format-source', + help='Format the source code', + default=False, + action='store_true', + dest='fmt_source') + source.add_argument('-ft', '--format-tests', + help='Format tests files', + default=False, + action='store_true', + dest='fmt_tests') + + args = p.parse_args() + + if args.config: + print(CONFIG) + exit(0) + + if args.clean: + clean_build() + + assert_structure() + assert_executable(CC) + + if args.expand: + expand_code() + if not args.noformat: + assert_executable('clang-format') + format_expand() + + if args.fmt_source or args.fmt_tests: + assert_executable('find') + assert_executable('xargs') + format_code(args.fmt_source, args.fmt_tests) + + if args.rerun: + build_tests(False) + run_tests() + elif args.run: + run_tests() + elif args.coverage: + build_tests(True) + run_tests() diff --git a/src/utl/futils.h b/src/utl/futils.h index 28f9473..26726dc 100644 --- a/src/utl/futils.h +++ b/src/utl/futils.h @@ -323,7 +323,8 @@ static inline size_t cmc_float_hash(float e) if (e == 0.0) e = 0.0; // if e == -0.0, now it is 0.0 - union { + union + { float a; size_t b; } x; @@ -342,7 +343,8 @@ static inline size_t cmc_double_hash(double e) if (e == 0.0) e = 0.0; // if e == -0.0, now it is 0.0 - union { + union + { double a; size_t b; } x; diff --git a/tests/main.c b/tests/main.c index 51de592..4007f43 100644 --- a/tests/main.c +++ b/tests/main.c @@ -1,5 +1,5 @@ -#include #include +#include #include "unt/cmc/bitset.h" #include "unt/cmc/deque.h" @@ -20,8 +20,8 @@ #include "unt/utl/foreach.h" -#include "utl/timer.h" #include "utl/assert.h" +#include "utl/timer.h" #include "./unt/utl.h" diff --git a/tests/src/cmc/hashmap.c b/tests/src/cmc/hashmap.c index 8d49630..7fb16b5 100644 --- a/tests/src/cmc/hashmap.c +++ b/tests/src/cmc/hashmap.c @@ -277,7 +277,7 @@ size_t hm_get(struct hashmap *_map_, size_t key) if (hm_empty(_map_)) { _map_->flag = CMC_FLAG_EMPTY; - return 0; + return (size_t){ 0 }; } struct hashmap_entry *entry = hm_impl_get_entry(_map_, key); if (!entry) @@ -296,7 +296,7 @@ size_t *hm_get_ref(struct hashmap *_map_, size_t key) if (hm_empty(_map_)) { _map_->flag = CMC_FLAG_EMPTY; - return 0; + return ((void *)0); } struct hashmap_entry *entry = hm_impl_get_entry(_map_, key); if (!entry) diff --git a/tests/src/cmc/hashmultimap.c b/tests/src/cmc/hashmultimap.c index 7450bee..45ef628 100644 --- a/tests/src/cmc/hashmultimap.c +++ b/tests/src/cmc/hashmultimap.c @@ -423,7 +423,7 @@ size_t hmm_get(struct hashmultimap *_map_, size_t key) if (hmm_empty(_map_)) { _map_->flag = CMC_FLAG_EMPTY; - return 0; + return (size_t){ 0 }; } struct hashmultimap_entry *entry = hmm_impl_get_entry(_map_, key); if (!entry) @@ -442,7 +442,7 @@ size_t *hmm_get_ref(struct hashmultimap *_map_, size_t key) if (hmm_empty(_map_)) { _map_->flag = CMC_FLAG_EMPTY; - return 0; + return ((void *)0); } struct hashmultimap_entry *entry = hmm_impl_get_entry(_map_, key); if (!entry) diff --git a/tests/src/cmc/treemap.c b/tests/src/cmc/treemap.c index 39ceb86..6c495e7 100644 --- a/tests/src/cmc/treemap.c +++ b/tests/src/cmc/treemap.c @@ -339,7 +339,7 @@ size_t tm_get(struct treemap *_map_, size_t key) if (tm_empty(_map_)) { _map_->flag = CMC_FLAG_EMPTY; - return 0; + return (size_t){ 0 }; } struct treemap_node *node = tm_impl_get_node(_map_, key); if (!node) @@ -358,7 +358,7 @@ size_t *tm_get_ref(struct treemap *_map_, size_t key) if (tm_empty(_map_)) { _map_->flag = CMC_FLAG_EMPTY; - return 0; + return ((void *)0); } struct treemap_node *node = tm_impl_get_node(_map_, key); if (!node) diff --git a/tests/types.c b/tests/types.c index 9923014..ec6678f 100644 --- a/tests/types.c +++ b/tests/types.c @@ -17,142 +17,143 @@ typedef enum enum_e NONE = 0 } enum_t; -typedef union union_u { +typedef union union_u +{ enum enum_e a; struct struct_s b; double c; char *d; } union_t; -typedef int (func_t)(int, double, char *); +typedef int(func_t)(int, double, char *); -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d0, deque0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm0, hashbidimap0, , struct_t *, struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm0, hashmap0, , struct_t *, struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d0, deque0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm0, hashbidimap0, , struct_t *, struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm0, hashmap0, , struct_t *, struct_t *)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm0, hashmultimap0, , struct_t *, struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms0, hashmultiset0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs0, hashset0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h0, heap0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih0, intervalheap0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll0, linkedlist0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l0, list0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q0, queue0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl0, sortedlist0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s0, stack0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm0, treemap0, , struct_t *, struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts0, treeset0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms0, hashmultiset0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs0, hashset0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h0, heap0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih0, intervalheap0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll0, linkedlist0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l0, list0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q0, queue0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl0, sortedlist0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s0, stack0, , , struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm0, treemap0, , struct_t *, struct_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts0, treeset0, , , struct_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d1, deque1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm1, hashbidimap1, , struct_t, struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm1, hashmap1, , struct_t, struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d1, deque1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm1, hashbidimap1, , struct_t, struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm1, hashmap1, , struct_t, struct_t)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm1, hashmultimap1, , struct_t, struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms1, hashmultiset1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs1, hashset1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h1, heap1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih1, intervalheap1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll1, linkedlist1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l1, list1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q1, queue1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl1, sortedlist1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s1, stack1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm1, treemap1, , struct_t, struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts1, treeset1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms1, hashmultiset1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs1, hashset1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h1, heap1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih1, intervalheap1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll1, linkedlist1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l1, list1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q1, queue1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl1, sortedlist1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s1, stack1, , , struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm1, treemap1, , struct_t, struct_t)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts1, treeset1, , , struct_t)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d2, deque2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm2, hashbidimap2, , int, int)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm2, hashmap2, , int, int)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d2, deque2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm2, hashbidimap2, , int, int)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm2, hashmap2, , int, int)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm2, hashmultimap2, , int, int)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms2, hashmultiset2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs2, hashset2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h2, heap2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih2, intervalheap2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll2, linkedlist2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l2, list2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q2, queue2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl2, sortedlist2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s2, stack2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm2, treemap2, , int, int)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts2, treeset2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms2, hashmultiset2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs2, hashset2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h2, heap2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih2, intervalheap2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll2, linkedlist2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l2, list2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q2, queue2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl2, sortedlist2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s2, stack2, , , int)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm2, treemap2, , int, int)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts2, treeset2, , , int)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d3, deque3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm3, hashbidimap3, , int *, int *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm3, hashmap3, , int *, int *)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d3, deque3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm3, hashbidimap3, , int *, int *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm3, hashmap3, , int *, int *)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm3, hashmultimap3, , int *, int *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms3, hashmultiset3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs3, hashset3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h3, heap3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih3, intervalheap3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll3, linkedlist3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l3, list3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q3, queue3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl3, sortedlist3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s3, stack3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm3, treemap3, , int *, int *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts3, treeset3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms3, hashmultiset3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs3, hashset3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h3, heap3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih3, intervalheap3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll3, linkedlist3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l3, list3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q3, queue3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl3, sortedlist3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s3, stack3, , , int *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm3, treemap3, , int *, int *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts3, treeset3, , , int *)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d4, deque4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm4, hashbidimap4, , enum_t, enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm4, hashmap4, , enum_t, enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d4, deque4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm4, hashbidimap4, , enum_t, enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm4, hashmap4, , enum_t, enum_t)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm4, hashmultimap4, , enum_t, enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms4, hashmultiset4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs4, hashset4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h4, heap4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih4, intervalheap4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll4, linkedlist4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l4, list4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q4, queue4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl4, sortedlist4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s4, stack4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm4, treemap4, , enum_t, enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts4, treeset4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms4, hashmultiset4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs4, hashset4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h4, heap4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih4, intervalheap4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll4, linkedlist4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l4, list4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q4, queue4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl4, sortedlist4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s4, stack4, , , enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm4, treemap4, , enum_t, enum_t)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts4, treeset4, , , enum_t)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d5, deque5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm5, hashbidimap5, , enum_t *, enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm5, hashmap5, , enum_t *, enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d5, deque5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm5, hashbidimap5, , enum_t *, enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm5, hashmap5, , enum_t *, enum_t *)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm5, hashmultimap5, , enum_t *, enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms5, hashmultiset5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs5, hashset5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h5, heap5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih5, intervalheap5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll5, linkedlist5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l5, list5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q5, queue5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl5, sortedlist5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s5, stack5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm5, treemap5, , enum_t *, enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts5, treeset5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms5, hashmultiset5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs5, hashset5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h5, heap5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih5, intervalheap5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll5, linkedlist5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l5, list5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q5, queue5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl5, sortedlist5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s5, stack5, , , enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm5, treemap5, , enum_t *, enum_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts5, treeset5, , , enum_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d6, deque6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm6, hashbidimap6, , union_t, union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm6, hashmap6, , union_t, union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d6, deque6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm6, hashbidimap6, , union_t, union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm6, hashmap6, , union_t, union_t)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm6, hashmultimap6, , union_t, union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms6, hashmultiset6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs6, hashset6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h6, heap6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih6, intervalheap6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll6, linkedlist6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l6, list6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q6, queue6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl6, sortedlist6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s6, stack6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm6, treemap6, , union_t, union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts6, treeset6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms6, hashmultiset6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs6, hashset6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h6, heap6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih6, intervalheap6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll6, linkedlist6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l6, list6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q6, queue6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl6, sortedlist6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s6, stack6, , , union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm6, treemap6, , union_t, union_t)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts6, treeset6, , , union_t)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d7, deque7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm7, hashbidimap7, , union_t *, union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm7, hashmap7, , union_t *, union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d7, deque7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm7, hashbidimap7, , union_t *, union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm7, hashmap7, , union_t *, union_t *)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm7, hashmultimap7, , union_t *, union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms7, hashmultiset7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs7, hashset7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h7, heap7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih7, intervalheap7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll7, linkedlist7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l7, list7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q7, queue7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl7, sortedlist7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s7, stack7, , , union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm7, treemap7, , union_t *, union_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts7, treeset7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms7, hashmultiset7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs7, hashset7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h7, heap7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih7, intervalheap7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll7, linkedlist7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l7, list7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q7, queue7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl7, sortedlist7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s7, stack7, , , union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm7, treemap7, , union_t *, union_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts7, treeset7, , , union_t *)) // C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d8, deque8, , , func_t)) // C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm8, hashbidimap8, , func_t, func_t)) @@ -170,21 +171,21 @@ C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts7, treeset7, , , un // C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm8, treemap8, , func_t, func_t)) // C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts8, treeset8, , , func_t)) -C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, ( d9, deque9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm9, hashbidimap9, , func_t *, func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, ( hm9, hashmap9, , func_t *, func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, DEQUE, (d9, deque9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHBIDIMAP, (hbm9, hashbidimap9, , func_t *, func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMAP, (hm9, hashmap9, , func_t *, func_t *)) C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTIMAP, (hmm9, hashmultimap9, , func_t *, func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms9, hashmultiset9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, ( hs9, hashset9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, HEAP, ( h9, heap9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, ( ih9, intervalheap9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll9, linkedlist9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l9, list9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q9, queue9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl9, sortedlist9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s9, stack9, , , func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, ( tm9, treemap9, , func_t *, func_t *)) -C_MACRO_COLLECTIONS_ALL(CMC, TREESET, ( ts9, treeset9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHMULTISET, (hms9, hashmultiset9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HASHSET, (hs9, hashset9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, HEAP, (h9, heap9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, INTERVALHEAP, (ih9, intervalheap9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, (ll9, linkedlist9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, LIST, (l9, list9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, (q9, queue9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, (sl9, sortedlist9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, STACK, (s9, stack9, , , func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREEMAP, (tm9, treemap9, , func_t *, func_t *)) +C_MACRO_COLLECTIONS_ALL(CMC, TREESET, (ts9, treeset9, , , func_t *)) int main(void) { diff --git a/tests/unt/cmc/deque.h b/tests/unt/cmc/deque.h index af4fb8e..a072906 100644 --- a/tests/unt/cmc/deque.h +++ b/tests/unt/cmc/deque.h @@ -110,8 +110,7 @@ CMC_CREATE_UNIT(CMCDeque, true, { }); CMC_CREATE_TEST(PFX##_init_custom(), { - struct deque d = - d_init_custom(1000000, d_fval, d_alloc_node, callbacks); + struct deque d = d_init_custom(1000000, d_fval, d_alloc_node, callbacks); cmc_assert_not_equals(ptr, NULL, d.buffer); cmc_assert_equals(size_t, 1000000, d.capacity); @@ -247,8 +246,7 @@ CMC_CREATE_UNIT(CMCDeque, true, { cmc_assert_equals(size_t, 1000, d_count(&d)); size_t sum = 0; - for (size_t i = d.front, j = 0; j < d.count; - i = (i + 1) % d.capacity, j++) + for (size_t i = d.front, j = 0; j < d.count; i = (i + 1) % d.capacity, j++) sum += d.buffer[i]; cmc_assert_equals(size_t, 500500, sum); diff --git a/tests/unt/cmc/hashmap.h b/tests/unt/cmc/hashmap.h index a0710a2..c255fa8 100644 --- a/tests/unt/cmc/hashmap.h +++ b/tests/unt/cmc/hashmap.h @@ -130,8 +130,7 @@ CMC_CREATE_UNIT(CMCHashMap, true, { }); CMC_CREATE_TEST(PFX##_init_custom(), { - struct hashmap map = hm_init_custom(943722, 0.6, hm_fkey, hm_fval, - hm_alloc_node, callbacks); + struct hashmap map = hm_init_custom(943722, 0.6, hm_fkey, hm_fval, hm_alloc_node, callbacks); cmc_assert_not_equals(ptr, NULL, map.buffer); cmc_assert_equals(size_t, 0, map.count); @@ -227,8 +226,7 @@ CMC_CREATE_UNIT(CMCHashMap, true, { CMC_CREATE_TEST(PFX##_release(), { k_total_free = 0; v_total_free = 0; - struct hashmap map = - hm_init(100, 0.6, hm_fkey_counter, hm_fval_counter); + struct hashmap map = hm_init(100, 0.6, hm_fkey_counter, hm_fval_counter); cmc_assert_not_equals(ptr, NULL, map.buffer);