Changeset fbe3f03
- Timestamp:
- Apr 18, 2024, 12:12:03 PM (7 months ago)
- Branches:
- master
- Children:
- 60c5b6d
- Parents:
- 710d0c8c
- git-author:
- Peter A. Buhr <pabuhr@…> (04/18/24 12:08:05)
- git-committer:
- Peter A. Buhr <pabuhr@…> (04/18/24 12:12:03)
- Location:
- libcfa/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string.cfa
r710d0c8c rfbe3f03 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 7 21:17:06202413 // Update Count : 2 5912 // Last Modified On : Mon Apr 15 21:56:28 2024 13 // Update Count : 260 14 14 // 15 15 … … 198 198 cstr[len] = '\0'; // terminate 199 199 _Ostream_Manip(const char *) cf @= { cstr, f.wd, f.pc, f.base, {f.all} }; 200 os | cf | nonl; 201 return os; 200 return os | cf | nonl; 202 201 } // ?|? 203 202 -
libcfa/src/collections/string_res.cfa
r710d0c8c rfbe3f03 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Feb 10 17:47:22202413 // Update Count : 8 312 // Last Modified On : Mon Apr 15 21:56:27 2024 13 // Update Count : 85 14 14 // 15 15 … … 200 200 ofstream & ?|?(ofstream & out, const string_res & s) { 201 201 // CFA string is NOT null terminated, so print exactly lnth characters in a minimum width of 0. 202 out | wd( 0, s.Handle.lnth, s.Handle.s ) | nonl; 203 return out; 202 return out | wd( 0, s.Handle.lnth, s.Handle.s ) | nonl; 204 203 } 205 204 -
libcfa/src/stdlib.hfa
r710d0c8c rfbe3f03 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Apr 15 10:51:38202413 // Update Count : 81 512 // Last Modified On : Mon Apr 15 22:11:51 2024 13 // Update Count : 817 14 14 // 15 15 … … 215 215 } // alloc_internal$ 216 216 217 forall( TT ... | { T * alloc_internal$( void *, T *, size_t, size_t, S_fill(T), TT ); } ) {217 forall( TT ... | { T * alloc_internal$( void *, T *, size_t, size_t, S_fill(T), TT ); } ) { 218 218 T * alloc_internal$( void *, T *, size_t Align, size_t Dim, S_fill(T) Fill, T_resize Resize, TT rest ) { 219 219 return alloc_internal$( Resize, (T*)0p, Align, Dim, Fill, rest); … … 267 267 free( (void *)ptr ); // C free 268 268 } // free 269 static inline forall( T &, TT ... | { void free( TT ); } )269 static inline forall( T &, TT ... | { void free( TT ); } ) 270 270 void free( T * ptr, TT rest ) { 271 271 free( ptr ); … … 274 274 275 275 // CFA allocation/deallocation and constructor/destructor, non-array types 276 static inline forall( T & | sized(T), TT ... | { void ?{}( T &, TT ); } )276 static inline forall( T & | sized(T), TT ... | { void ?{}( T &, TT ); } ) 277 277 T * new( TT p ) { 278 278 return &(*(T *)malloc()){ p }; // run constructor … … 287 287 free( ptr ); // always call free 288 288 } // delete 289 static inline forall( T &, TT ... | { void ^?{}( T & ); void delete( TT ); } )289 static inline forall( T &, TT ... | { void ^?{}( T & ); void delete( TT ); } ) 290 290 void delete( T * ptr, TT rest ) { 291 291 delete( ptr ); … … 294 294 295 295 // CFA allocation/deallocation and constructor/destructor, array types 296 forall( T & | sized(T), TT ... | { void ?{}( T &, TT ); } ) T * anew( size_t dim, TT p );296 forall( T & | sized(T), TT ... | { void ?{}( T &, TT ); } ) T * anew( size_t dim, TT p ); 297 297 forall( T & | sized(T) | { void ^?{}( T & ); } ) void adelete( T arr[] ); 298 forall( T & | sized(T) | { void ^?{}( T & ); }, TT ... | { void adelete( TT ); } ) void adelete( T arr[], TT rest );298 forall( T & | sized(T) | { void ^?{}( T & ); }, TT ... | { void adelete( TT ); } ) void adelete( T arr[], TT rest ); 299 299 //--------------------------------------- 300 300 -
libcfa/src/time.hfa
r710d0c8c rfbe3f03 10 10 // Created On : Wed Mar 14 23:18:57 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Oct 8 09:07:48 202213 // Update Count : 6 6812 // Last Modified On : Thu Apr 18 12:07:21 2024 13 // Update Count : 670 14 14 // 15 15 … … 84 84 Duration ?`m( int64_t min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; } 85 85 Duration ?`m( double min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; } 86 Duration ?`h( int64_t hour s ) { return (Duration)@{ hours* (60LL * 60LL * TIMEGRAN) }; }87 Duration ?`h( double hour s ) { return (Duration)@{ hours* (60LL * 60LL * TIMEGRAN) }; }88 Duration ?`d( int64_t day s ) { return (Duration)@{ days* (24LL * 60LL * 60LL * TIMEGRAN) }; }89 Duration ?`d( double day s ) { return (Duration)@{ days* (24LL * 60LL * 60LL * TIMEGRAN) }; }90 Duration ?`w( int64_t week s ) { return (Duration)@{ weeks* (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }91 Duration ?`w( double week s ) { return (Duration)@{ weeks* (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }86 Duration ?`h( int64_t hour ) { return (Duration)@{ hour * (60LL * 60LL * TIMEGRAN) }; } 87 Duration ?`h( double hour ) { return (Duration)@{ hour * (60LL * 60LL * TIMEGRAN) }; } 88 Duration ?`d( int64_t day ) { return (Duration)@{ day * (24LL * 60LL * 60LL * TIMEGRAN) }; } 89 Duration ?`d( double day ) { return (Duration)@{ day * (24LL * 60LL * 60LL * TIMEGRAN) }; } 90 Duration ?`w( int64_t week ) { return (Duration)@{ week * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; } 91 Duration ?`w( double week ) { return (Duration)@{ week * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; } 92 92 93 93 int64_t ?`ns( Duration dur ) { return dur.tn; }
Note: See TracChangeset
for help on using the changeset viewer.