Changeset 0cfa768


Ignore:
Timestamp:
Aug 31, 2021, 1:49:10 AM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
09fda91
Parents:
a0e142f
git-author:
Jacob Prud'homme <jafprudhomme@…> (08/03/21 00:18:19)
git-committer:
Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:10)
Message:

Switched to using fixed-size buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    ra0e142f r0cfa768  
    128128                        // Right now doesn't handle duplicate keys. Should use hashmap for that
    129129                        char c;
    130                         StringBuilder key_sb;
    131                         StringBuilder value_sb;
     130                        [1024] char key;
     131                        [1024] char value;
     132                        //StringBuilder key_sb;
     133                        //StringBuilder value_sb;
    132134
    133135                        // Doesn't handle comments
     136                        in | key;
     137                        /*
    134138                        while () {
    135139                                in | c;
     
    141145                                }
    142146                        }
    143 
    144                         * char key = alloc( key_sb.size );
    145                         strcpy( key, key_sb.string );
     147                        */
     148
     149                        //* char key = alloc( key_sb.size );
     150                        //strcpy( key, key_sb.string );
    146151
    147152                        // Doesn't handle comments
     153                        in | value;
     154                        /*
    148155                        while () {
    149156                                in | c;
     
    151158                                add_char( value_sb, c );
    152159                        }
    153 
    154                         * char value = alloc( value_sb.size );
    155                         strcpy( value, value_sb.string );
     160                        */
     161
     162                        //* char value = alloc( value_sb.size );
     163                        //strcpy( value, value_sb.string );
    156164
    157165                        add_kv_pair( kv_pairs, key, value );
Note: See TracChangeset for help on using the changeset viewer.