Changeset e3fea42 for libcfa


Ignore:
Timestamp:
Feb 4, 2020, 2:03:07 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
52142c2
Parents:
1d94116
Message:

change "const char *" to "const char []"

Location:
libcfa/src
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/assert.cfa

    r1d94116 re3fea42  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 21 17:09:26 2019
    13 // Update Count     : 5
     12// Last Modified On : Tue Feb  4 13:00:18 2020
     13// Update Count     : 6
    1414//
    1515
     
    2626
    2727        // called by macro assert in assert.h
    28         void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
     28        void __assert_fail( const char assertion[], const char file[], unsigned int line, const char function[] ) {
    2929                __cfaabi_bits_print_safe( STDERR_FILENO, CFA_ASSERT_FMT ".\n", assertion, __progname, function, line, file );
    3030                abort();
     
    3232
    3333        // called by macro assertf
    34         void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) {
     34        void __assert_fail_f( const char assertion[], const char file[], unsigned int line, const char function[], const char fmt[], ... ) {
    3535                __cfaabi_bits_acquire();
    3636                __cfaabi_bits_print_nolock( STDERR_FILENO, CFA_ASSERT_FMT ": ", assertion, __progname, function, line, file );
  • libcfa/src/bits/debug.cfa

    r1d94116 re3fea42  
    1010// Created On       : Thu Mar 30 12:30:01 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 21 17:16:30 2019
    13 // Update Count     : 10
     12// Last Modified On : Tue Feb  4 13:03:16 2020
     13// Update Count     : 11
    1414//
    1515
     
    2727
    2828extern "C" {
    29 
    30         void __cfaabi_bits_write( int fd, const char *in_buffer, int len ) {
     29        void __cfaabi_bits_write( int fd, const char in_buffer[], int len ) {
    3130                // ensure all data is written
    3231                for ( int count = 0, retcode; count < len; count += retcode ) {
  • libcfa/src/bits/debug.hfa

    r1d94116 re3fea42  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 21 17:06:58 2019
    13 // Update Count     : 8
     12// Last Modified On : Tue Feb  4 12:29:21 2020
     13// Update Count     : 9
    1414//
    1515
     
    2121        #define __cfaabi_dbg_ctx __PRETTY_FUNCTION__
    2222        #define __cfaabi_dbg_ctx2 , __PRETTY_FUNCTION__
    23         #define __cfaabi_dbg_ctx_param const char * caller
    24         #define __cfaabi_dbg_ctx_param2 , const char * caller
     23        #define __cfaabi_dbg_ctx_param const char caller[]
     24        #define __cfaabi_dbg_ctx_param2 , const char caller[]
    2525#else
    2626        #define __cfaabi_dbg_debug_do(...)
     
    3838        #include <stdio.h>
    3939
    40         extern void __cfaabi_bits_write( int fd, const char *buffer, int len );
     40        extern void __cfaabi_bits_write( int fd, const char buffer[], int len );
    4141        extern void __cfaabi_bits_acquire();
    4242        extern void __cfaabi_bits_release();
  • libcfa/src/bits/locks.hfa

    r1d94116 re3fea42  
    1010// Created On       : Tue Oct 31 15:14:38 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug 11 15:42:24 2018
    13 // Update Count     : 10
     12// Last Modified On : Tue Feb  4 13:03:19 2020
     13// Update Count     : 11
    1414//
    1515
     
    5454
    5555                #ifdef __CFA_DEBUG__
    56                         void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name);
     56                        void __cfaabi_dbg_record(__spinlock_t & this, const char prev_name[]);
    5757                #else
    5858                        #define __cfaabi_dbg_record(x, y)
  • libcfa/src/concurrency/coroutine.cfa

    r1d94116 re3fea42  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec  5 14:37:29 2019
    13 // Update Count     : 15
     12// Last Modified On : Tue Feb  4 12:29:25 2020
     13// Update Count     : 16
    1414//
    1515
     
    8989}
    9090
    91 void ?{}( coroutine_desc & this, const char * name, void * storage, size_t storageSize ) with( this ) {
     91void ?{}( coroutine_desc & this, const char name[], void * storage, size_t storageSize ) with( this ) {
    9292        (this.context){0p, 0p};
    9393        (this.stack){storage, storageSize};
  • libcfa/src/concurrency/coroutine.hfa

    r1d94116 re3fea42  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec  3 22:47:58 2019
    13 // Update Count     : 10
     12// Last Modified On : Tue Feb  4 12:29:26 2020
     13// Update Count     : 11
    1414//
    1515
     
    3535// void ^?{}( coStack_t & this );
    3636
    37 void ?{}( coroutine_desc & this, const char * name, void * storage, size_t storageSize );
     37void ?{}( coroutine_desc & this, const char name[], void * storage, size_t storageSize );
    3838void ^?{}( coroutine_desc & this );
    3939
     
    4141static inline void ?{}( coroutine_desc & this, size_t stackSize)                     { this{ "Anonymous Coroutine", 0p, stackSize }; }
    4242static inline void ?{}( coroutine_desc & this, void * storage, size_t storageSize )  { this{ "Anonymous Coroutine", storage, storageSize }; }
    43 static inline void ?{}( coroutine_desc & this, const char * name)                    { this{ name, 0p, 0 }; }
    44 static inline void ?{}( coroutine_desc & this, const char * name, size_t stackSize ) { this{ name, 0p, stackSize }; }
     43static inline void ?{}( coroutine_desc & this, const char name[])                    { this{ name, 0p, 0 }; }
     44static inline void ?{}( coroutine_desc & this, const char name[], size_t stackSize ) { this{ name, 0p, stackSize }; }
    4545
    4646//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/kernel.cfa

    r1d94116 re3fea42  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jan 30 22:55:50 2020
    13 // Update Count     : 56
     12// Last Modified On : Tue Feb  4 13:03:15 2020
     13// Update Count     : 58
    1414//
    1515
     
    209209
    210210static void start(processor * this);
    211 void ?{}(processor & this, const char * name, cluster & cltr) with( this ) {
     211void ?{}(processor & this, const char name[], cluster & cltr) with( this ) {
    212212        this.name = name;
    213213        this.cltr = &cltr;
     
    238238}
    239239
    240 void ?{}(cluster & this, const char * name, Duration preemption_rate) with( this ) {
     240void ?{}(cluster & this, const char name[], Duration preemption_rate) with( this ) {
    241241        this.name = name;
    242242        this.preemption_rate = preemption_rate;
     
    441441}
    442442
    443 static void Abort( int ret, const char * func ) {
     443static void Abort( int ret, const char func[] ) {
    444444        if ( ret ) {                                                                            // pthread routines return errno values
    445445                abort( "%s : internal error, error(%d) %s.", func, ret, strerror( ret ) );
     
    978978__cfaabi_dbg_debug_do(
    979979        extern "C" {
    980                 void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name) {
     980                void __cfaabi_dbg_record(__spinlock_t & this, const char prev_name[]) {
    981981                        this.prev_name = prev_name;
    982982                        this.prev_thrd = kernelTLS.this_thread;
  • libcfa/src/concurrency/kernel.hfa

    r1d94116 re3fea42  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec  4 07:54:51 2019
    13 // Update Count     : 18
     12// Last Modified On : Tue Feb  4 12:29:26 2020
     13// Update Count     : 22
    1414//
    1515
     
    150150};
    151151
    152 void  ?{}(processor & this, const char * name, struct cluster & cltr);
     152void  ?{}(processor & this, const char name[], struct cluster & cltr);
    153153void ^?{}(processor & this);
    154154
    155155static inline void  ?{}(processor & this)                    { this{ "Anonymous Processor", *mainCluster}; }
    156156static inline void  ?{}(processor & this, struct cluster & cltr)    { this{ "Anonymous Processor", cltr}; }
    157 static inline void  ?{}(processor & this, const char * name) { this{name, *mainCluster }; }
     157static inline void  ?{}(processor & this, const char name[]) { this{name, *mainCluster }; }
    158158
    159159static inline [processor *&, processor *& ] __get( processor & this ) {
     
    195195extern Duration default_preemption();
    196196
    197 void ?{} (cluster & this, const char * name, Duration preemption_rate);
     197void ?{} (cluster & this, const char name[], Duration preemption_rate);
    198198void ^?{}(cluster & this);
    199199
    200200static inline void ?{} (cluster & this)                           { this{"Anonymous Cluster", default_preemption()}; }
    201201static inline void ?{} (cluster & this, Duration preemption_rate) { this{"Anonymous Cluster", preemption_rate}; }
    202 static inline void ?{} (cluster & this, const char * name)        { this{name, default_preemption()}; }
     202static inline void ?{} (cluster & this, const char name[])        { this{name, default_preemption()}; }
    203203
    204204static inline [cluster *&, cluster *& ] __get( cluster & this ) {
  • libcfa/src/fstream.cfa

    r1d94116 re3fea42  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Nov 29 06:56:46 2019
    13 // Update Count     : 355
     12// Last Modified On : Tue Feb  4 11:55:29 2020
     13// Update Count     : 356
    1414//
    1515
     
    4848void sepReset( ofstream & os, bool reset ) { os.sepDefault = reset; os.sepOnOff = os.sepDefault; }
    4949const char * sepGetCur( ofstream & os ) { return os.sepCur; }
    50 void sepSetCur( ofstream & os, const char * sepCur ) { os.sepCur = sepCur; }
     50void sepSetCur( ofstream & os, const char sepCur[] ) { os.sepCur = sepCur; }
    5151bool getNL( ofstream & os ) { return os.sawNL; }
    5252void setNL( ofstream & os, bool state ) { os.sawNL = state; }
     
    5858void ?{}( ofstream & os ) { os.file = 0; }
    5959
    60 void ?{}( ofstream & os, const char * name, const char * mode ) {
     60void ?{}( ofstream & os, const char name[], const char mode[] ) {
    6161        open( os, name, mode );
    6262} // ?{}
    6363
    64 void ?{}( ofstream & os, const char * name ) {
     64void ?{}( ofstream & os, const char name[] ) {
    6565        open( os, name, "w" );
    6666} // ?{}
     
    9191
    9292const char * sepGet( ofstream & os ) { return os.separator; }
    93 void sepSet( ofstream & os, const char * s ) {
     93void sepSet( ofstream & os, const char s[] ) {
    9494        assert( s );
    9595        strncpy( os.separator, s, sepSize - 1 );
     
    9898
    9999const char * sepGetTuple( ofstream & os ) { return os.tupleSeparator; }
    100 void sepSetTuple( ofstream & os, const char * s ) {
     100void sepSetTuple( ofstream & os, const char s[] ) {
    101101        assert( s );
    102102        strncpy( os.tupleSeparator, s, sepSize - 1 );
     
    119119} // flush
    120120
    121 void open( ofstream & os, const char * name, const char * mode ) {
     121void open( ofstream & os, const char name[], const char mode[] ) {
    122122        FILE * file = fopen( name, mode );
    123123        #ifdef __CFA_DEBUG__
     
    129129} // open
    130130
    131 void open( ofstream & os, const char * name ) {
     131void open( ofstream & os, const char name[] ) {
    132132        open( os, name, "w" );
    133133} // open
     
    141141} // close
    142142
    143 ofstream & write( ofstream & os, const char * data, size_t size ) {
     143ofstream & write( ofstream & os, const char data[], size_t size ) {
    144144        if ( fail( os ) ) {
    145145                abort | IO_MSG "attempt write I/O on failed stream";
     
    191191void ?{}( ifstream & is ) {     is.file = 0; }
    192192
    193 void ?{}( ifstream & is, const char * name, const char * mode ) {
     193void ?{}( ifstream & is, const char name[], const char mode[] ) {
    194194        open( is, name, mode );
    195195} // ?{}
    196196
    197 void ?{}( ifstream & is, const char * name ) {
     197void ?{}( ifstream & is, const char name[] ) {
    198198        open( is, name, "r" );
    199199} // ?{}
     
    215215} // eof
    216216
    217 void open( ifstream & is, const char * name, const char * mode ) {
     217void open( ifstream & is, const char name[], const char mode[] ) {
    218218        FILE * file = fopen( name, mode );
    219219        #ifdef __CFA_DEBUG__
     
    225225} // open
    226226
    227 void open( ifstream & is, const char * name ) {
     227void open( ifstream & is, const char name[] ) {
    228228        open( is, name, "r" );
    229229} // open
  • libcfa/src/fstream.hfa

    r1d94116 re3fea42  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Nov 29 06:56:02 2019
    13 // Update Count     : 168
     12// Last Modified On : Tue Feb  4 13:03:17 2020
     13// Update Count     : 172
    1414//
    1515
     
    4040void sepReset( ofstream &, bool );
    4141const char * sepGetCur( ofstream & );
    42 void sepSetCur( ofstream &, const char * );
     42void sepSetCur( ofstream &, const char [] );
    4343bool getNL( ofstream & );
    4444void setNL( ofstream &, bool );
     
    5656
    5757const char * sepGet( ofstream & );
    58 void sepSet( ofstream &, const char * );
     58void sepSet( ofstream &, const char [] );
    5959const char * sepGetTuple( ofstream & );
    60 void sepSetTuple( ofstream &, const char * );
     60void sepSetTuple( ofstream &, const char [] );
    6161
    6262void ends( ofstream & os );
    6363int fail( ofstream & );
    6464int flush( ofstream & );
    65 void open( ofstream &, const char * name, const char * mode );
    66 void open( ofstream &, const char * name );
     65void open( ofstream &, const char name[], const char mode[] );
     66void open( ofstream &, const char name[] );
    6767void close( ofstream & );
    68 ofstream & write( ofstream &, const char * data, size_t size );
     68ofstream & write( ofstream &, const char data[], size_t size );
    6969int fmt( ofstream &, const char format[], ... );
    7070
    7171void ?{}( ofstream & os );
    72 void ?{}( ofstream & os, const char * name, const char * mode );
    73 void ?{}( ofstream & os, const char * name );
     72void ?{}( ofstream & os, const char name[], const char mode[] );
     73void ?{}( ofstream & os, const char name[] );
    7474void ^?{}( ofstream & os );
    7575
     
    9292int fail( ifstream & is );
    9393int eof( ifstream & is );
    94 void open( ifstream & is, const char * name, const char * mode );
    95 void open( ifstream & is, const char * name );
     94void open( ifstream & is, const char name[], const char mode[] );
     95void open( ifstream & is, const char name[] );
    9696void close( ifstream & is );
    9797ifstream & read( ifstream & is, char * data, size_t size );
     
    100100
    101101void ?{}( ifstream & is );
    102 void ?{}( ifstream & is, const char * name, const char * mode );
    103 void ?{}( ifstream & is, const char * name );
     102void ?{}( ifstream & is, const char name[], const char mode[] );
     103void ?{}( ifstream & is, const char name[] );
    104104void ^?{}( ifstream & is );
    105105
  • libcfa/src/gmp.hfa

    r1d94116 re3fea42  
    1010// Created On       : Tue Apr 19 08:43:43 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 13 15:25:05 2019
    13 // Update Count     : 27
     12// Last Modified On : Tue Feb  4 11:55:07 2020
     13// Update Count     : 28
    1414//
    1515
     
    3131        void ?{}( Int & this, signed long int init ) { mpz_init_set_si( this.mpz, init ); }
    3232        void ?{}( Int & this, unsigned long int init ) { mpz_init_set_ui( this.mpz, init ); }
    33         void ?{}( Int & this, const char * val ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
     33        void ?{}( Int & this, const char val[] ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
    3434        void ^?{}( Int & this ) { mpz_clear( this.mpz ); }
    3535
     
    3737        Int ?`mp( signed long int init ) { return (Int){ init }; }
    3838        Int ?`mp( unsigned long int init ) { return (Int){ init }; }
    39         Int ?`mp( const char * init ) { return (Int){ init }; }
     39        Int ?`mp( const char init[] ) { return (Int){ init }; }
    4040
    4141        // assignment
     
    4343        Int ?=?( Int & lhs, long int rhs ) { mpz_set_si( lhs.mpz, rhs ); return lhs; }
    4444        Int ?=?( Int & lhs, unsigned long int rhs ) { mpz_set_ui( lhs.mpz, rhs ); return lhs; }
    45         Int ?=?( Int & lhs, const char * rhs ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { abort | "invalid string conversion"; } return lhs; }
     45        Int ?=?( Int & lhs, const char rhs[] ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { abort | "invalid string conversion"; } return lhs; }
    4646
    4747        char ?=?( char & lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
  • libcfa/src/heap.cfa

    r1d94116 re3fea42  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec  8 21:01:31 2019
    13 // Update Count     : 647
     12// Last Modified On : Tue Feb  4 10:04:51 2020
     13// Update Count     : 648
    1414//
    1515
     
    380380
    381381
    382 static inline void checkHeader( bool check, const char * name, void * addr ) {
     382static inline void checkHeader( bool check, const char name[], void * addr ) {
    383383        if ( unlikely( check ) ) {                                                      // bad address ?
    384384                abort( "Attempt to %s storage %p with address outside the heap.\n"
     
    418418
    419419
    420 static inline bool headers( const char * name __attribute__(( unused )), void * addr, HeapManager.Storage.Header *& header, HeapManager.FreeHeader *& freeElem, size_t & size, size_t & alignment ) with ( heapManager ) {
     420static inline bool headers( const char name[] __attribute__(( unused )), void * addr, HeapManager.Storage.Header *& header, HeapManager.FreeHeader *& freeElem, size_t & size, size_t & alignment ) with ( heapManager ) {
    421421        header = headerAddr( addr );
    422422
  • libcfa/src/iostream.cfa

    r1d94116 re3fea42  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 13 08:07:59 2019
    13 // Update Count     : 821
     12// Last Modified On : Tue Feb  4 10:07:17 2020
     13// Update Count     : 822
    1414//
    1515
     
    237237        } // ?|?
    238238
    239         ostype & ?|?( ostype & os, const char * str ) {
     239        ostype & ?|?( ostype & os, const char str[] ) {
    240240                enum { Open = 1, Close, OpenClose };
    241241                static const unsigned char mask[256] @= {
     
    275275                return write( os, str, len );
    276276        } // ?|?
    277         void ?|?( ostype & os, const char * str ) {
     277
     278        void ?|?( ostype & os, const char str[] ) {
    278279                (ostype &)(os | str); ends( os );
    279280        } // ?|?
     
    536537                return os; \
    537538        } /* ?|? */ \
     539\
    538540        void ?|?( ostype & os, _Ostream_Manip(T) f ) { (ostype &)(os | f); ends( os ); } \
    539541} // distribution
     
    571573                return os;
    572574        } // ?|?
     575
    573576        void ?|?( ostype & os, _Ostream_Manip(char) f ) { (ostype &)(os | f); ends( os ); }
    574577} // distribution
     
    616619                return os;
    617620        } // ?|?
     621
    618622        void ?|?( ostype & os, _Ostream_Manip(const char *) f ) { (ostype &)(os | f); ends( os ); }
    619623} // distribution
     
    735739        } // ?|?
    736740
    737         // istype & ?|?( istype & is, const char * fmt ) {
     741        // istype & ?|?( istype & is, const char fmt[] ) {
    738742        //      fmt( is, fmt, "" );
    739743        //      return is;
  • libcfa/src/iostream.hfa

    r1d94116 re3fea42  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 12 12:08:38 2019
    13 // Update Count     : 334
     12// Last Modified On : Tue Feb  4 11:55:28 2020
     13// Update Count     : 335
    1414//
    1515
     
    2828        void sepReset( ostype &, bool );                                        // set separator and default state
    2929        const char * sepGetCur( ostype & );                                     // get current separator string
    30         void sepSetCur( ostype &, const char * );                       // set current separator string
     30        void sepSetCur( ostype &, const char [] );                      // set current separator string
    3131        bool getNL( ostype & );                                                         // check newline
    3232        void setNL( ostype &, bool );                                           // saw newline
     
    4343
    4444        const char * sepGet( ostype & );                                        // get separator string
    45         void sepSet( ostype &, const char * );                          // set separator to string (15 character maximum)
     45        void sepSet( ostype &, const char [] );                         // set separator to string (15 character maximum)
    4646        const char * sepGetTuple( ostype & );                           // get tuple separator string
    47         void sepSetTuple( ostype &, const char * );                     // set tuple separator to string (15 character maximum)
     47        void sepSetTuple( ostype &, const char [] );            // set tuple separator to string (15 character maximum)
    4848
    4949        void ends( ostype & os );                                                       // end of output statement
    5050        int fail( ostype & );
    5151        int flush( ostype & );
    52         void open( ostype & os, const char * name, const char * mode );
     52        void open( ostype & os, const char name[], const char mode[] );
    5353        void close( ostype & os );
    54         ostype & write( ostype &, const char *, size_t );
     54        ostype & write( ostype &, const char [], size_t );
    5555        int fmt( ostype &, const char format[], ... ) __attribute__(( format(printf, 2, 3) ));
    5656}; // ostream
     
    113113        void ?|?( ostype &, long double _Complex );
    114114
    115         ostype & ?|?( ostype &, const char * );
    116         void ?|?( ostype &, const char * );
     115        ostype & ?|?( ostype &, const char [] );
     116        void ?|?( ostype &, const char [] );
    117117        // ostype & ?|?( ostype &, const char16_t * );
    118118#if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous
     
    256256
    257257static inline {
    258         _Ostream_Manip(const char *) bin( const char * s ) { return (_Ostream_Manip(const char *))@{ s, 1, 0, 'b', { .all : 0 } }; }
    259         _Ostream_Manip(const char *) oct( const char * s ) { return (_Ostream_Manip(const char *))@{ s, 1, 0, 'o', { .all : 0 } }; }
    260         _Ostream_Manip(const char *) hex( const char * s ) { return (_Ostream_Manip(const char *))@{ s, 1, 0, 'x', { .all : 0 } }; }
    261         _Ostream_Manip(const char *) wd( unsigned int w, const char * s ) { return (_Ostream_Manip(const char *))@{ s, w, 0, 's', { .all : 0 } }; }
    262         _Ostream_Manip(const char *) wd( unsigned int w, unsigned char pc, const char * s ) { return (_Ostream_Manip(const char *))@{ s, w, pc, 's', { .flags.pc : true } }; }
     258        _Ostream_Manip(const char *) bin( const char s[] ) { return (_Ostream_Manip(const char *))@{ s, 1, 0, 'b', { .all : 0 } }; }
     259        _Ostream_Manip(const char *) oct( const char s[] ) { return (_Ostream_Manip(const char *))@{ s, 1, 0, 'o', { .all : 0 } }; }
     260        _Ostream_Manip(const char *) hex( const char s[] ) { return (_Ostream_Manip(const char *))@{ s, 1, 0, 'x', { .all : 0 } }; }
     261        _Ostream_Manip(const char *) wd( unsigned int w, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, w, 0, 's', { .all : 0 } }; }
     262        _Ostream_Manip(const char *) wd( unsigned int w, unsigned char pc, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, w, pc, 's', { .flags.pc : true } }; }
    263263        _Ostream_Manip(const char *) & wd( unsigned int w, _Ostream_Manip(const char *) & fmt ) { fmt.wd = w; return fmt; }
    264264        _Ostream_Manip(const char *) & wd( unsigned int w, unsigned char pc, _Ostream_Manip(const char *) & fmt ) { fmt.wd = w; fmt.pc = pc; fmt.flags.pc = true; return fmt; }
     
    281281        int fail( istype & );
    282282        int eof( istype & );
    283         void open( istype & is, const char * name );
     283        void open( istype & is, const char name[] );
    284284        void close( istype & is );
    285285        istype & read( istype &, char *, size_t );
     
    316316        istype & ?|?( istype &, long double _Complex & );
    317317
    318 //      istype & ?|?( istype &, const char * );
     318//      istype & ?|?( istype &, const char [] );
    319319        istype & ?|?( istype &, char * );
    320320
     
    343343static inline {
    344344        _Istream_Cstr skip( unsigned int n ) { return (_Istream_Cstr){ 0p, 0p, n, { .all : 0 } }; }
    345         _Istream_Cstr skip( const char * scanset ) { return (_Istream_Cstr){ 0p, scanset, -1, { .all : 0 } }; }
    346         _Istream_Cstr incl( const char * scanset, char * s ) { return (_Istream_Cstr){ s, scanset, -1, { .flags.inex : false } }; }
    347         _Istream_Cstr & incl( const char * scanset, _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = false; return fmt; }
    348         _Istream_Cstr excl( const char * scanset, char * s ) { return (_Istream_Cstr){ s, scanset, -1, { .flags.inex : true } }; }
    349         _Istream_Cstr & excl( const char * scanset, _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; }
    350         _Istream_Cstr ignore( const char * s ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; }
     345        _Istream_Cstr skip( const char scanset[] ) { return (_Istream_Cstr){ 0p, scanset, -1, { .all : 0 } }; }
     346        _Istream_Cstr incl( const char scanset[], char * s ) { return (_Istream_Cstr){ s, scanset, -1, { .flags.inex : false } }; }
     347        _Istream_Cstr & incl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = false; return fmt; }
     348        _Istream_Cstr excl( const char scanset[], char * s ) { return (_Istream_Cstr){ s, scanset, -1, { .flags.inex : true } }; }
     349        _Istream_Cstr & excl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; }
     350        _Istream_Cstr ignore( const char s[] ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; }
    351351        _Istream_Cstr & ignore( _Istream_Cstr & fmt ) { fmt.flags.ignore = true; return fmt; }
    352         _Istream_Cstr wdi( unsigned int w, char * s ) { return (_Istream_Cstr)@{ s, 0p, w, { .all : 0 } }; }
     352        _Istream_Cstr wdi( unsigned int w, char s[] ) { return (_Istream_Cstr)@{ s, 0p, w, { .all : 0 } }; }
    353353        _Istream_Cstr & wdi( unsigned int w, _Istream_Cstr & fmt ) { fmt.wd = w; return fmt; }
    354354} // distribution
  • libcfa/src/math.hfa

    r1d94116 re3fea42  
    1010// Created On       : Mon Apr 18 23:37:04 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 13 11:02:15 2018
    13 // Update Count     : 116
     12// Last Modified On : Tue Feb  4 10:27:11 2020
     13// Update Count     : 117
    1414//
    1515
     
    5151static inline long double fdim( long double x, long double y ) { return fdiml( x, y ); }
    5252
    53 static inline float nan( const char * tag ) { return nanf( tag ); }
    54 // extern "C" { double nan( const char * ); }
    55 static inline long double nan( const char * tag ) { return nanl( tag ); }
     53static inline float nan( const char tag[] ) { return nanf( tag ); }
     54// extern "C" { double nan( const char [] ); }
     55static inline long double nan( const char tag[] ) { return nanl( tag ); }
    5656
    5757//---------------------- Exponential ----------------------
  • libcfa/src/startup.cfa

    r1d94116 re3fea42  
    1010// Created On       : Tue Jul 24 16:21:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Dec 13 13:16:45 2019
    13 // Update Count     : 29
     12// Last Modified On : Tue Feb  4 13:03:18 2020
     13// Update Count     : 30
    1414//
    1515
     
    4141struct __spinlock_t;
    4242extern "C" {
    43         void __cfaabi_dbg_record(struct __spinlock_t & this, const char * prev_name) __attribute__(( weak )) {}
     43        void __cfaabi_dbg_record(struct __spinlock_t & this, const char prev_name[]) __attribute__(( weak )) {}
    4444}
    4545
  • libcfa/src/stdhdr/assert.h

    r1d94116 re3fea42  
    1010// Created On       : Mon Jul  4 23:25:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jul 31 23:09:32 2017
    13 // Update Count     : 13
     12// Last Modified On : Tue Feb  4 12:58:49 2020
     13// Update Count     : 15
    1414//
    1515
     
    2727        #define assertf( expr, fmt, ... ) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
    2828
    29         void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn, format( printf, 5, 6) ));
     29        void __assert_fail_f( const char assertion[], const char file[], unsigned int line, const char function[], const char fmt[], ... ) __attribute__((noreturn, format( printf, 5, 6) ));
    3030#endif
    3131
  • libcfa/src/stdlib.cfa

    r1d94116 re3fea42  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Nov 20 17:22:47 2019
    13 // Update Count     : 485
     12// Last Modified On : Tue Feb  4 08:27:08 2020
     13// Update Count     : 486
    1414//
    1515
     
    107107//---------------------------------------
    108108
    109 float _Complex strto( const char * sptr, char ** eptr ) {
     109float _Complex strto( const char sptr[], char ** eptr ) {
    110110        float re, im;
    111111        char * eeptr;
     
    118118} // strto
    119119
    120 double _Complex strto( const char * sptr, char ** eptr ) {
     120double _Complex strto( const char sptr[], char ** eptr ) {
    121121        double re, im;
    122122        char * eeptr;
     
    129129} // strto
    130130
    131 long double _Complex strto( const char * sptr, char ** eptr ) {
     131long double _Complex strto( const char sptr[], char ** eptr ) {
    132132        long double re, im;
    133133        char * eeptr;
  • libcfa/src/stdlib.hfa

    r1d94116 re3fea42  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Nov 29 23:08:02 2019
    13 // Update Count     : 400
     12// Last Modified On : Tue Feb  4 08:27:01 2020
     13// Update Count     : 401
    1414//
    1515
     
    193193
    194194static inline {
    195         int strto( const char * sptr, char ** eptr, int base ) { return (int)strtol( sptr, eptr, base ); }
    196         unsigned int strto( const char * sptr, char ** eptr, int base ) { return (unsigned int)strtoul( sptr, eptr, base ); }
    197         long int strto( const char * sptr, char ** eptr, int base ) { return strtol( sptr, eptr, base ); }
    198         unsigned long int strto( const char * sptr, char ** eptr, int base ) { return strtoul( sptr, eptr, base ); }
    199         long long int strto( const char * sptr, char ** eptr, int base ) { return strtoll( sptr, eptr, base ); }
    200         unsigned long long int strto( const char * sptr, char ** eptr, int base ) { return strtoull( sptr, eptr, base ); }
    201 
    202         float strto( const char * sptr, char ** eptr ) { return strtof( sptr, eptr ); }
    203         double strto( const char * sptr, char ** eptr ) { return strtod( sptr, eptr ); }
    204         long double strto( const char * sptr, char ** eptr ) { return strtold( sptr, eptr ); }
    205 } // distribution
    206 
    207 float _Complex strto( const char * sptr, char ** eptr );
    208 double _Complex strto( const char * sptr, char ** eptr );
    209 long double _Complex strto( const char * sptr, char ** eptr );
     195        int strto( const char sptr[], char ** eptr, int base ) { return (int)strtol( sptr, eptr, base ); }
     196        unsigned int strto( const char sptr[], char ** eptr, int base ) { return (unsigned int)strtoul( sptr, eptr, base ); }
     197        long int strto( const char sptr[], char ** eptr, int base ) { return strtol( sptr, eptr, base ); }
     198        unsigned long int strto( const char sptr[], char ** eptr, int base ) { return strtoul( sptr, eptr, base ); }
     199        long long int strto( const char sptr[], char ** eptr, int base ) { return strtoll( sptr, eptr, base ); }
     200        unsigned long long int strto( const char sptr[], char ** eptr, int base ) { return strtoull( sptr, eptr, base ); }
     201
     202        float strto( const char sptr[], char ** eptr ) { return strtof( sptr, eptr ); }
     203        double strto( const char sptr[], char ** eptr ) { return strtod( sptr, eptr ); }
     204        long double strto( const char sptr[], char ** eptr ) { return strtold( sptr, eptr ); }
     205} // distribution
     206
     207float _Complex strto( const char sptr[], char ** eptr );
     208double _Complex strto( const char sptr[], char ** eptr );
     209long double _Complex strto( const char sptr[], char ** eptr );
    210210
    211211static inline {
    212         int ato( const char * sptr ) { return (int)strtol( sptr, 0p, 10 ); }
    213         unsigned int ato( const char * sptr ) { return (unsigned int)strtoul( sptr, 0p, 10 ); }
    214         long int ato( const char * sptr ) { return strtol( sptr, 0p, 10 ); }
    215         unsigned long int ato( const char * sptr ) { return strtoul( sptr, 0p, 10 ); }
    216         long long int ato( const char * sptr ) { return strtoll( sptr, 0p, 10 ); }
    217         unsigned long long int ato( const char * sptr ) { return strtoull( sptr, 0p, 10 ); }
    218 
    219         float ato( const char * sptr ) { return strtof( sptr, 0p ); }
    220         double ato( const char * sptr ) { return strtod( sptr, 0p ); }
    221         long double ato( const char * sptr ) { return strtold( sptr, 0p ); }
    222 
    223         float _Complex ato( const char * sptr ) { return strto( sptr, 0p ); }
    224         double _Complex ato( const char * sptr ) { return strto( sptr, 0p ); }
    225         long double _Complex ato( const char * sptr ) { return strto( sptr, 0p ); }
     212        int ato( const char sptr[] ) { return (int)strtol( sptr, 0p, 10 ); }
     213        unsigned int ato( const char sptr[] ) { return (unsigned int)strtoul( sptr, 0p, 10 ); }
     214        long int ato( const char sptr[] ) { return strtol( sptr, 0p, 10 ); }
     215        unsigned long int ato( const char sptr[] ) { return strtoul( sptr, 0p, 10 ); }
     216        long long int ato( const char sptr[] ) { return strtoll( sptr, 0p, 10 ); }
     217        unsigned long long int ato( const char sptr[] ) { return strtoull( sptr, 0p, 10 ); }
     218
     219        float ato( const char sptr[] ) { return strtof( sptr, 0p ); }
     220        double ato( const char sptr[] ) { return strtod( sptr, 0p ); }
     221        long double ato( const char sptr[] ) { return strtold( sptr, 0p ); }
     222
     223        float _Complex ato( const char sptr[] ) { return strto( sptr, 0p ); }
     224        double _Complex ato( const char sptr[] ) { return strto( sptr, 0p ); }
     225        long double _Complex ato( const char sptr[] ) { return strto( sptr, 0p ); }
    226226} // distribution
    227227
  • libcfa/src/time.cfa

    r1d94116 re3fea42  
    1010// Created On       : Tue Mar 27 13:33:14 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jan  5 17:27:40 2020
    13 // Update Count     : 69
     12// Last Modified On : Tue Feb  4 08:24:18 2020
     13// Update Count     : 70
    1414//
    1515
     
    129129} // dd_mm_yy
    130130
    131 size_t strftime( char * buf, size_t size, const char * fmt, Time time ) with( time ) {
     131size_t strftime( char buf[], size_t size, const char fmt[], Time time ) with( time ) {
    132132        time_t s = tn / TIMEGRAN;
    133133        tm tm;
  • libcfa/src/time.hfa

    r1d94116 re3fea42  
    1010// Created On       : Wed Mar 14 23:18:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan  6 12:50:16 2020
    13 // Update Count     : 653
     12// Last Modified On : Tue Feb  4 08:24:32 2020
     13// Update Count     : 654
    1414//
    1515
     
    191191} // dmy
    192192
    193 size_t strftime( char * buf, size_t size, const char * fmt, Time time );
     193size_t strftime( char buf[], size_t size, const char fmt[], Time time );
    194194
    195195//------------------------- timeval (cont) -------------------------
Note: See TracChangeset for help on using the changeset viewer.