Changeset 6abb6dc for libcfa


Ignore:
Timestamp:
Aug 10, 2024, 10:27:26 AM (18 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master, stuck-waitfor-destruct
Children:
774c97e
Parents:
2ca7fc2 (diff), 5ca5263 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
libcfa/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/collections/string.hfa

    r2ca7fc2 r6abb6dc  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug  5 23:06:14 2024
    13 // Update Count     : 128
     12// Last Modified On : Tue Aug  6 07:49:52 2024
     13// Update Count     : 130
    1414//
    1515
     
    161161string ?+?( char c, const string & s );                                 // add a character to a copy of the string
    162162string ?+?( const string & s, const string & s2 );              // copy and concatenate both strings
    163 string ?+?( const char * s, char c );                                   // copy and concatenate both strings
    164 string ?+?( char c, const char * s );                                   // copy and concatenate both strings
    165 string ?+?( const char * s1, const char * s2 );                 // copy and concatenate both strings
    166 string ?+?( const char * s1, string & s2 );                             // copy and concatenate both strings
    167 string ?+?( const string & s, const char * c );                 // copy and concatenate with NULL-terminated string
     163string ?+?( const char * s, char c );                                   // add a character to a copy of the string
     164string ?+?( char c, const char * s );                                   // add a character to a copy of the string
     165string ?+?( const char * c, const char * s );                   // copy and add with two NULL-terminated string
     166string ?+?( const char * c, string & s );                               // copy and add with NULL-terminated string
     167string ?+?( const string & s, const char * c );                 // copy and add with NULL-terminated string
    168168
    169169static inline string & strcat( string & s, const string & s2 ) { s += s2; return s; }
     
    184184
    185185// Comparisons
    186 int strcmp ( const string &, const string &);
    187 bool ?==?( const string &, const string &);
    188 bool ?!=?( const string &, const string &);
    189 bool ?>? ( const string &, const string &);
    190 bool ?>=?( const string &, const string &);
    191 bool ?<=?( const string &, const string &);
    192 bool ?<? ( const string &, const string &);
    193 
    194 int strcmp( const string &, const char *);
    195 bool ?==?( const string &, const char *);
    196 bool ?!=?( const string &, const char *);
    197 bool ?>? ( const string &, const char *);
    198 bool ?>=?( const string &, const char *);
    199 bool ?<=?( const string &, const char *);
    200 bool ?<? ( const string &, const char *);
    201 
    202 int strcmp( const char *, const string &);
    203 bool ?==?( const char *, const string &);
    204 bool ?!=?( const char *, const string &);
    205 bool ?>? ( const char *, const string &);
    206 bool ?>=?( const char *, const string &);
    207 bool ?<=?( const char *, const string &);
    208 bool ?<? ( const char *, const string &);
     186int strcmp ( const string &, const string & );
     187bool ?==?( const string &, const string & );
     188bool ?!=?( const string &, const string & );
     189bool ?>? ( const string &, const string & );
     190bool ?>=?( const string &, const string & );
     191bool ?<=?( const string &, const string & );
     192bool ?<? ( const string &, const string & );
     193
     194int strcmp( const string &, const char * );
     195bool ?==?( const string &, const char * );
     196bool ?!=?( const string &, const char * );
     197bool ?>? ( const string &, const char * );
     198bool ?>=?( const string &, const char * );
     199bool ?<=?( const string &, const char * );
     200bool ?<? ( const string &, const char * );
     201
     202int strcmp( const char *, const string & );
     203bool ?==?( const char *, const string & );
     204bool ?!=?( const char *, const string & );
     205bool ?>? ( const char *, const string & );
     206bool ?>=?( const char *, const string & );
     207bool ?<=?( const char *, const string & );
     208bool ?<? ( const char *, const string & );
    209209
    210210
  • libcfa/src/enum.cfa

    r2ca7fc2 r6abb6dc  
    1111                // It is okay to overflow as overflow will be theoretically caught by the other bound
    1212                if ( i < fromInstance( lower ) || i > fromInstance( upper ) )
    13                         abort( "call to fromInt has index %d outside enumeration range %d-%d",
     13                        abort( "call to fromInt has index %d outside of enumeration range %d-%d.",
    1414                                   i, fromInstance( lower ), fromInstance( upper ) );
    1515                return fromInt_unsafe( i );
     
    1919                E upper = upperBound();
    2020                if ( fromInstance( e ) >= fromInstance( upper ) )
    21                         abort( "call to succ() exceeds enumeration upper bound of %d", fromInstance( upper ) );
     21                        abort( "call to succ() exceeds enumeration upper bound of %d.", fromInstance( upper ) );
    2222                return succ_unsafe(e);
    2323        }
     
    2626                E lower = lowerBound();
    2727                if ( fromInstance( e ) <= fromInstance(lower ) )
    28                         abort( "call to pred() exceeds enumeration lower bound of %d", fromInstance( lower ) );
     28                        abort( "call to pred() exceeds enumeration lower bound of %d.", fromInstance( lower ) );
    2929                return pred_unsafe( e );
    3030        }
    3131
    32         int Countof( __attribute__((unused)) E e ) {
     32        int Countof( E ) {
    3333                E upper = upperBound();
    3434                E lower = lowerBound();
  • libcfa/src/enum.hfa

    r2ca7fc2 r6abb6dc  
    1919        E succ( E e );
    2020        E pred( E e );
    21         int Countof( E e );
     21        int Countof( E );
    2222}
    2323
  • libcfa/src/heap.cfa

    r2ca7fc2 r6abb6dc  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Apr  7 21:54:29 2024
    13 // Update Count     : 1644
     12// Last Modified On : Wed Aug  7 10:14:47 2024
     13// Update Count     : 1646
    1414//
    1515
     
    582582                        __cfaabi_bits_print_buffer( STDERR_FILENO, helpText, sizeof(helpText),
    583583                                                                                "CFA warning (UNIX pid:%ld) : program terminating with %td(%#tx) bytes of storage allocated but not freed.\n"
    584                                                                                 "Possible cause is unfreed storage allocated by the program or system/library routines called from the program.\n",
     584                                                                                "Possible cause is mismatched allocation/deallocation calls (malloc/free), direct constructor call without a direct destructor call, or system/library routines not freeing storage.\n",
    585585                                                                                (long int)getpid(), allocUnfreed, allocUnfreed ); // always print the UNIX pid
    586586                } // if
Note: See TracChangeset for help on using the changeset viewer.