Changeset 6808

Show
Ignore:
Timestamp:
08/09/10 14:52:57 (17 months ago)
Author:
westram
Message:
  • removed duplicate of ARB_strscmp (GBS_strscmp). No longer needed cause ARBDB is now C++
  • arb_str.h was lacking size_t
Location:
branches/refactor
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • branches/refactor/ARBDB/Makefile

    r6807 r6808  
    880880adtools.o: $(ARBHOME)/INCLUDE/arb_core.h 
    881881adtools.o: $(ARBHOME)/INCLUDE/arb_error.h 
     882adtools.o: $(ARBHOME)/INCLUDE/arb_str.h 
    882883adtools.o: $(ARBHOME)/INCLUDE/arbtools.h 
    883884adtools.o: $(ARBHOME)/INCLUDE/attributes.h 
  • branches/refactor/ARBDB/ad_prot.h

    r6753 r6808  
    201201char *GBS_fconvert_string(char *buffer); 
    202202char *GBS_replace_tabs_by_spaces(const char *text); 
    203 int GBS_strscmp(const char *s1, const char *s2); 
    204203const char *GBS_readable_size(unsigned long long size); 
    205204char *GBS_trim(const char *str); 
  • branches/refactor/ARBDB/adstring.cxx

    r6753 r6808  
    19531953} 
    19541954 
    1955 int GBS_strscmp(const char *s1, const char *s2) { 
    1956     int    cmp = 0; 
    1957     size_t idx = 0; 
    1958     while (!cmp) { 
    1959         if (!s1[idx] || !s2[idx]) break; 
    1960         cmp = s1[idx] - s2[idx]; 
    1961         ++idx; 
    1962     } 
    1963     return cmp; 
    1964 } 
    1965  
    19661955const char *GBS_readable_size(unsigned long long size) { 
    19671956    // return human readable size information 
  • branches/refactor/ARBDB/adtools.cxx

    r6659 r6808  
    99// =============================================================== // 
    1010 
     11#include <arb_str.h> 
    1112#include <arbdbt.h> 
    1213 
     
    130131    } 
    131132    else { 
    132         if (GBS_strscmp(insert->datapath, key+1) == 0) { // datapath matches 
     133        if (ARB_strscmp(insert->datapath, key+1) == 0) { // datapath matches 
    133134            to_insert    = strdup(key+strlen(insert->datapath)); // cut off prefix 
    134135            to_insert[0] = key[0]; // copy type 
  • branches/refactor/TEMPLATES/arb_str.h

    r6804 r6808  
    1313#define ARB_STR_H 
    1414 
     15#ifndef _CPP_CSTDDEF 
     16#include <cstddef> 
     17#endif 
     18#ifndef _CPP_CCTYPE 
    1519#include <cctype> 
    16  
    17 #ifndef __cplusplus 
    18 // this header only works with c++ 
    19 // those functions needed by ARBDB are duplicated in adstring.c (with GBS_-prefix) 
    20 #error inline.h may be used in C++ only 
    2120#endif 
    2221