Changeset 30548de for libcfa/src


Ignore:
Timestamp:
Apr 11, 2025, 6:39:45 PM (6 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
a514fed
Parents:
a800a19
Message:

change manipulator name quoted to quote

Location:
libcfa/src
Files:
7 edited

Legend:

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

    ra800a19 r30548de  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 11 08:31:21 2025
    13 // Update Count     : 369
     12// Last Modified On : Fri Apr 11 18:18:07 2025
     13// Update Count     : 370
    1414//
    1515
     
    234234        }
    235235
    236         istype & ?|?( istype & is, _Istream_Squoted f ) {
    237                 _Istream_Rquoted f2 = { { f.sstr.s.inner, (_Istream_str_base)f.sstr } };
     236        istype & ?|?( istype & is, _Istream_Squote f ) {
     237                _Istream_Rquote f2 = { { f.sstr.s.inner, (_Istream_str_base)f.sstr } };
    238238                return is | f2;
    239239        } // ?|?
  • libcfa/src/collections/string.hfa

    ra800a19 r30548de  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 11 08:28:27 2025
    13 // Update Count     : 260
     12// Last Modified On : Fri Apr 11 18:13:35 2025
     13// Update Count     : 261
    1414//
    1515
     
    111111}; // _Istream_Swidth
    112112
    113 struct _Istream_Squoted {
     113struct _Istream_Squote {
    114114        _Istream_Swidth sstr;
    115 }; // _Istream_Squoted
     115}; // _Istream_Squote
    116116
    117117struct _Istream_Sstr {
     
    131131                f.delimiters[0] = delimiter; f.delimiters[1] = '\0'; f.flags.delimiter = true; return (_Istream_Sstr &)f;
    132132        }
    133         _Istream_Squoted quoted( string & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {
    134                 return (_Istream_Squoted)@{ { .s = s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };
     133        _Istream_Squote quote( string & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {
     134                return (_Istream_Squote)@{ { .s = s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };
    135135        }
    136         _Istream_Squoted & quoted( _Istream_Swidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
     136        _Istream_Squote & quote( _Istream_Swidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
    137137                f.delimiters[0] = Ldelimiter;  f.delimiters[1] = Rdelimiter;  f.delimiters[2] = '\0';
    138                 return (_Istream_Squoted &)f;
     138                return (_Istream_Squote &)f;
    139139        }
    140140//      _Istream_Sstr incl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ { .s = s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } } }; }
     
    147147        _Istream_Sstr ignore( string & s ) { return (_Istream_Sstr)@{ .s = s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } }; }
    148148        _Istream_Sstr & ignore( _Istream_Swidth & f ) { f.flags.ignore = true; return (_Istream_Sstr &)f; }
    149         _Istream_Squoted & ignore( _Istream_Squoted & f ) { f.sstr.flags.ignore = true; return (_Istream_Squoted &)f; }
     149        _Istream_Squote & ignore( _Istream_Squote & f ) { f.sstr.flags.ignore = true; return (_Istream_Squote &)f; }
    150150//      _Istream_Sstr & ignore( _Istream_Sstr & f ) { f.sstr.flags.ignore = true; return (_Istream_Sstr &)f; }
    151151        _Istream_Sstr & ignore( _Istream_Sstr & f ) { f.flags.ignore = true; return (_Istream_Sstr &)f; }
     
    153153
    154154forall( istype & | basic_istream( istype ) ) {
    155         istype & ?|?( istype & is, _Istream_Squoted f );
     155        istype & ?|?( istype & is, _Istream_Squote f );
    156156        istype & ?|?( istype & is, _Istream_Sstr f );
    157157        static inline istype & ?|?( istype & is, _Istream_Swidth f ) { return is | *(_Istream_Sstr *)&f; }
  • libcfa/src/collections/string_res.cfa

    ra800a19 r30548de  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr  9 08:44:17 2025
    13 // Update Count     : 128
     12// Last Modified On : Fri Apr 11 18:18:42 2025
     13// Update Count     : 129
    1414//
    1515
     
    249249
    250250forall( istype & | basic_istream( istype ) )
    251 istype & ?|?( istype & is, _Istream_Rquoted f ) with( f.rstr ) {
     251istype & ?|?( istype & is, _Istream_Rquote f ) with( f.rstr ) {
    252252        if ( eof( is ) ) throwResume ExceptionInst( end_of_file );
    253253        int args;
  • libcfa/src/collections/string_res.hfa

    ra800a19 r30548de  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr  9 15:16:29 2025
    13 // Update Count     : 76
     12// Last Modified On : Fri Apr 11 18:11:05 2025
     13// Update Count     : 77
    1414//
    1515
     
    132132}; // _Istream_Rwidth
    133133
    134 struct _Istream_Rquoted {
     134struct _Istream_Rquote {
    135135        // string_res * s;
    136136        // inline _Istream_str_base;
    137137        _Istream_Rwidth rstr;
    138 }; // _Istream_Rquoted
     138}; // _Istream_Rquote
    139139
    140140struct _Istream_Rstr {
     
    154154                f.delimiters[0] = delimiter; f.delimiters[1] = '\0'; f.flags.delimiter = true; return (_Istream_Rstr &)f;
    155155        }
    156         _Istream_Rquoted quoted( string_res & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {
    157                 return (_Istream_Rquoted)@{ { .s = &s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };
    158         }
    159         _Istream_Rquoted & quoted( _Istream_Rwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
     156        _Istream_Rquote quote( string_res & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {
     157                return (_Istream_Rquote)@{ { .s = &s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };
     158        }
     159        _Istream_Rquote & quote( _Istream_Rwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
    160160                f.delimiters[0] = Ldelimiter;  f.delimiters[1] = Rdelimiter;  f.delimiters[2] = '\0';
    161                 return (_Istream_Rquoted &)f;
     161                return (_Istream_Rquote &)f;
    162162        }
    163163        _Istream_Rstr incl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } }; }
     
    167167        _Istream_Rstr ignore( string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } }; }
    168168        _Istream_Rstr & ignore( _Istream_Rwidth & f ) { f.flags.ignore = true; return (_Istream_Rstr &)f; }
    169         _Istream_Rquoted & ignore( _Istream_Rquoted & f ) { f.rstr.flags.ignore = true; return (_Istream_Rquoted &)f; }
     169        _Istream_Rquote & ignore( _Istream_Rquote & f ) { f.rstr.flags.ignore = true; return (_Istream_Rquote &)f; }
    170170        _Istream_Rstr & ignore( _Istream_Rstr & f ) { f.flags.ignore = true; return (_Istream_Rstr &)f; }
    171171} // distribution
    172172forall( istype & | basic_istream( istype ) ) {
    173         istype & ?|?( istype & is, _Istream_Rquoted f );
     173        istype & ?|?( istype & is, _Istream_Rquote f );
    174174        istype & ?|?( istype & is, _Istream_Rstr f );
    175175        static inline istype & ?|?( istype & is, _Istream_Rwidth f ) { return is | *(_Istream_Rstr *)&f; }
  • libcfa/src/exception.c

    ra800a19 r30548de  
    1010// Created On       : Mon Jun 26 15:13:00 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 10 16:45:22 2023
    13 // Update Count     : 69
     12// Last Modified On : Wed Sep 25 17:23:49 2024
     13// Update Count     : 74
    1414//
    1515
     
    2727#include "stdhdr/assert.h"
    2828#include "virtual.h"
     29#include <unistd.h>                                                                             // write
    2930
    3031extern void __cabi_abort( const char fmt[], ... );
     
    124125        case _URC_FATAL_PHASE2_ERROR:
    125126        default:
     127                write( 2, "abort1\n", 7 );
    126128                abort();
    127129        }
     
    138140        if ( ! store ) {
    139141                // Failure: cannot allocate exception. Terminate thread.
     142                write( 2, "abort2\n", 7 );
    140143                abort(); // <- Although I think it might be the process.
    141144        }
     
    200203                __cabi_abort(
    201204                        "Propagation failed to find a matching handler.\n"
    202                         "Possible cause is a missing try block with appropriate catch clause for specified exception type.\n"
     205                        "Possible cause is a missing try block with appropriate catch clause for the specified or derived exception type.\n"
    203206                        "Last exception name or message: %s.\n",
    204207                        NODE_TO_EXCEPT( UNWIND_TO_NODE( unwind_exception ) )->
     
    225228        ret = __cfaehm_cancellation_unwind( &node->unwind_exception );
    226229        printf("UNWIND ERROR %d after force unwind\n", ret);
     230        write( 2, "abort3\n", 7 );
    227231        abort();
    228232}
     
    246250        if ( NULL == context->current_exception ) {
    247251                printf("UNWIND ERROR missing exception in begin unwind\n");
     252                write( 2, "abort4\n", 7 );
    248253                abort();
    249254        }
     
    271276#endif
    272277                printf("UNWIND ERROR %d after raise exception\n", ret);
     278                write( 2, "abort5\n", 7 );
    273279                abort();
    274280        }
     
    292298        // TODO: Print some error message.
    293299        (void)except;
     300        write( 2, "abort6\n", 7 );
    294301        abort();
    295302}
     
    299306
    300307        __cfaehm_begin_unwind( __cfaehm_rethrow_adapter );
     308        write( 2, "abort7\n", 7 );
    301309        abort();
    302310}
  • libcfa/src/iostream.cfa

    ra800a19 r30548de  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 22 07:31:19 2025
    13 // Update Count     : 2079
     12// Last Modified On : Fri Apr 11 18:19:09 2025
     13// Update Count     : 2080
    1414//
    1515
     
    10061006        }
    10071007
    1008         istype & ?|?( istype & is, _Istream_Cquoted f ) with( f.cstr ) {
     1008        istype & ?|?( istype & is, _Istream_Cquote f ) with( f.cstr ) {
    10091009                if ( eof( is ) ) throwResume ExceptionInst( end_of_file );
    10101010                int args;
     
    10831083                        if ( flags.delimiter ) {                                        // getline
    10841084                                int len = 0;                                                    // may not be set in fmt
    1085                                 if ( delimiters[2] != '\0' ) {                  // (quoted) read single character ?
     1085                                if ( delimiters[2] != '\0' ) {                  // (quote) read single character ?
    10861086                                        sprintf( &fmtstr[pos], "c%%n" );
    10871087                                } else {
  • libcfa/src/iostream.hfa

    ra800a19 r30548de  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Oct 13 10:49:40 2024
    13 // Update Count     : 765
     12// Last Modified On : Fri Apr 11 18:11:25 2025
     13// Update Count     : 766
    1414//
    1515
     
    420420// Restrict nesting of input manipulators to those combinations that make sense.
    421421
    422 struct _Istream_Cquoted {
     422struct _Istream_Cquote {
    423423        _Istream_Cwidth cstr;
    424 }; // _Istream_Cquoted
     424}; // _Istream_Cquote
    425425
    426426struct _Istream_Cstr {
     
    441441                f.delimiters[0] = delimiter; f.delimiters[1] = '\0'; f.flags.delimiter = true; return (_Istream_Cstr &)f;
    442442        }
    443         _Istream_Cquoted quoted( char & ch, const char Ldelimiter = '\'', const char Rdelimiter = '\0' ) {
    444                 return (_Istream_Cquoted)@{ { .s = &ch, { {.delimiters = { Ldelimiter, Rdelimiter, '\1' }}, .wd = 1, {.flags.rwd = true} } } };
     443        _Istream_Cquote quote( char & ch, const char Ldelimiter = '\'', const char Rdelimiter = '\0' ) {
     444                return (_Istream_Cquote)@{ { .s = &ch, { {.delimiters = { Ldelimiter, Rdelimiter, '\1' }}, .wd = 1, {.flags.rwd = true} } } };
    445445        }
    446         _Istream_Cquoted & quoted( _Istream_Cwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
     446        _Istream_Cquote & quote( _Istream_Cwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
    447447                f.delimiters[0] = Ldelimiter;  f.delimiters[1] = Rdelimiter;  f.delimiters[2] = '\0';
    448                 return (_Istream_Cquoted &)f;
     448                return (_Istream_Cquote &)f;
    449449        }
    450450        _Istream_Cstr & incl( const char scanset[], _Istream_Cwidth & f ) { f.scanset = scanset; f.flags.inex = false; return (_Istream_Cstr &)f; }
     
    452452        _Istream_Cstr ignore( const char s[] ) { return (_Istream_Cstr)@{ { .s = (char *)s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } } }; }
    453453        _Istream_Cstr & ignore( _Istream_Cwidth & f ) { f.flags.ignore = true; return (_Istream_Cstr &)f; }
    454         _Istream_Cquoted & ignore( _Istream_Cquoted & f ) { f.cstr.flags.ignore = true; return (_Istream_Cquoted &)f; }
     454        _Istream_Cquote & ignore( _Istream_Cquote & f ) { f.cstr.flags.ignore = true; return (_Istream_Cquote &)f; }
    455455        _Istream_Cstr & ignore( _Istream_Cstr & f ) { f.cstr.flags.ignore = true; return (_Istream_Cstr &)f; }
    456456} // distribution
     
    458458forall( istype & | basic_istream( istype ) ) {
    459459        istype & ?|?( istype & is, _Istream_Cskip f );
    460         istype & ?|?( istype & is, _Istream_Cquoted f );
     460        istype & ?|?( istype & is, _Istream_Cquote f );
    461461        istype & ?|?( istype & is, _Istream_Cstr f );
    462462        static inline istype & ?|?( istype & is, _Istream_Cwidth f ) { return is | *(_Istream_Cstr *)&f; }
Note: See TracChangeset for help on using the changeset viewer.