Changeset 6806

Show
Ignore:
Timestamp:
08/09/10 11:41:12 (17 months ago)
Author:
westram
Message:
  • header for global general purpose defines/inlines
  • use ARRAY_ELEMS where applicable
Location:
branches/refactor
Files:
1 added
6 modified

Legend:

Unmodified
Added
Removed
  • branches/refactor/ARBDB/adlang1.cxx

    r6659 r6806  
    1919 
    2020#include <static_assert.h> 
     21#include <arb_defs.h> 
    2122 
    2223#define AWAR_TREE_REFRESH "tmp/focus/tree_refresh" // touch this awar to refresh the tree display 
     
    26922693}; 
    26932694 
    2694 void gbl_install_standard_commands(GBDATA *gb_main) 
    2695 { 
    2696     gb_install_command_table(gb_main, gbl_command_table, sizeof(gbl_command_table)/sizeof(gbl_command_table[0])); 
    2697 } 
     2695void gbl_install_standard_commands(GBDATA *gb_main) { 
     2696    gb_install_command_table(gb_main, gbl_command_table, ARRAY_ELEMS(gbl_command_table)); 
     2697} 
  • branches/refactor/AWT/AWT_www.cxx

    r6804 r6806  
    1616#include <arbdbt.h> 
    1717#include <arb_str.h> 
     18#include <arb_defs.h> 
    1819#include <static_assert.h> 
    1920 
     
    5859 
    5960    const int DEFAULT_SELECT = 1; // SILVA 
    60     const int EXAMPLE_COUNT  = sizeof(example)/sizeof(*example); 
     61    const int EXAMPLE_COUNT  = ARRAY_ELEMS(example); 
    6162    COMPILE_ASSERT(EXAMPLE_COUNT <= WWW_COUNT); 
    6263 
  • branches/refactor/SL/FAST_ALIGNER/fast_aligner.cxx

    r6722 r6806  
    1818 
    1919#include <awtc_next_neighbours.hxx> 
    20  
    2120#include <awt_sel_boxes.hxx> 
    2221 
     
    2524 
    2625#include <arbdbt.h> 
     26 
     27#include <arb_defs.h> 
    2728 
    2829#include <cctype> 
     
    29692970} 
    29702971 
    2971 #define TEST_SPECIES_COUNT(test_ali_data) (sizeof(test_ali_data)/sizeof(*test_ali_data)) 
    2972 #define TEST_CREATE_DB(error, test_ali_data) test_create_DB(error, test_ali_data, TEST_SPECIES_COUNT(test_ali_data)) 
     2972#define TEST_SPECIES_COUNT(test_ali_data)   ARRAY_ELEMS(test_ali_data) 
     2973#define TEST_CREATE_DB(error,test_ali_data) test_create_DB(error, test_ali_data, TEST_SPECIES_COUNT(test_ali_data)) 
    29732974 
    29742975static const char *get_aligned_data_of(GBDATA *gb_main, const char *species_name) { 
  • branches/refactor/SOURCE_TOOLS/generate_all_links.sh

    r6804 r6806  
    141141symlink_file ../TEMPLATES/arb_core.h INCLUDE/arb_core.h && 
    142142symlink_file ../TEMPLATES/arb_debug.h INCLUDE/arb_debug.h && 
     143symlink_file ../TEMPLATES/arb_defs.h INCLUDE/arb_defs.h && 
    143144symlink_file ../TEMPLATES/arb_error.h INCLUDE/arb_error.h && 
     145symlink_file ../TEMPLATES/arb_str.h INCLUDE/arb_str.h && 
    144146symlink_file ../TEMPLATES/arb_version.h INCLUDE/arb_version.h && 
    145147symlink_file ../TEMPLATES/arbtools.h INCLUDE/arbtools.h && 
     
    149151symlink_file ../TEMPLATES/downcast.h INCLUDE/downcast.h && 
    150152symlink_file ../TEMPLATES/dupstr.h INCLUDE/dupstr.h && 
    151 symlink_file ../TEMPLATES/arb_str.h INCLUDE/arb_str.h && 
    152153symlink_file ../TEMPLATES/output.h INCLUDE/output.h && 
    153154symlink_file ../TEMPLATES/perf_timer.h INCLUDE/perf_timer.h && 
  • branches/refactor/TOOLS/arb_probe.cxx

    r6803 r6806  
    1313#include <client.h> 
    1414#include <servercntrl.h> 
     15#include <arb_defs.h> 
    1516 
    1617struct apd_sequence { 
     
    487488} 
    488489 
    489 #define COUNT(array) sizeof(array)/sizeof(*array) 
    490  
    491490void TEST_SLOW_match_probe() { 
    492491    const char *arguments[] = { 
     
    498497        "BcSSSS00\1" "  BcSSSS00            0     0  0.0   2 0   .......UU-===============-UCAAGUCGA\1"; 
    499498 
    500     test_arb_probe(COUNT(arguments), arguments, expected); 
     499    test_arb_probe(ARRAY_ELEMS(arguments), arguments, expected); 
    501500} 
    502501 
     
    521520        "AUCAAGUCGAGCGAUGAA 18 B-     1   16    4 44.4 52.0    UUCAUCGCUCGACUUGAU |  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  2,  3,\n"; 
    522521 
    523     test_arb_probe(COUNT(arguments), arguments, expected); 
     522    test_arb_probe(ARRAY_ELEMS(arguments), arguments, expected); 
    524523} 
    525524 
     
    536535    "ClfPerfr\1" "  ClfPerfr            0     0  0.0  17 0   AGAGUUUGA-==================-UUUCCUUCG\1"; 
    537536 
    538     test_arb_probe(COUNT(arguments), arguments, expected); 
     537    test_arb_probe(ARRAY_ELEMS(arguments), arguments, expected); 
    539538} 
    540539 
  • branches/refactor/WINDOW/AW_xkey.cxx

    r6674 r6806  
    1414 
    1515#include <arbdbt.h> 
     16#include <arb_defs.h> 
    1617 
    1718#include <X11/Xlib.h> 
     
    9697}; 
    9798 
    98 #define ARRAY_ELEMS(array)            (sizeof(array)/sizeof(array[0])) 
    99 #define TERMINATED_ARRAY_ELEMS(array) (ARRAY_ELEMS(array)-1) 
    100  
    10199const int FIXEDMOD = TERMINATED_ARRAY_ELEMS(awxkeymap); 
    102100const int MODFREE  = TERMINATED_ARRAY_ELEMS(awxkeymap_modfree);