Changeset e8b5ba4 for tests/concurrency
- Timestamp:
- Oct 18, 2024, 5:03:27 PM (4 weeks ago)
- Branches:
- master
- Children:
- 3a08cb1
- Parents:
- 02ea981
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/examples/quickSort.cfa
r02ea981 re8b5ba4 11 11 // Created On : Wed Dec 6 12:15:52 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Sat Aug 17 13:59:15202414 // Update Count : 19913 // Last Modified On : Fri Oct 18 16:43:26 2024 14 // Update Count : 200 15 15 // 16 16 … … 112 112 fallthrough; 113 113 case 3: case 2: 114 // open input file first as output creates file 114 115 if ( strcmp( argv[1], "d" ) != 0 ) { 115 try { // open input file first as output creates file 116 open( unsortedfile, argv[1] ); 117 } catch( open_failure * ) { // open failed ? 118 serr | "Error! Could not open unsorted input file \"" | argv[1] | "\""; 119 throw ExceptionInst( cmd_error ); 120 } // try 116 open( unsortedfile, argv[1] ); 121 117 } // if 122 118 if ( argc > 2 && strcmp( argv[2], "d" ) != 0 ) { 123 try { 124 open( sortedfile, argv[2] ); 125 } catch( open_failure * ) { // open failed ? 126 serr | "Error! Could not open sorted output file \"" | argv[2] | "\""; 127 throw ExceptionInst( cmd_error ); 128 } // try 119 open( sortedfile, argv[2] ); 129 120 } // if 130 121 fallthrough; … … 134 125 } // choose 135 126 } // if 127 } catch( open_failure * ) { // open failed ? 128 exit | "Error! Could not open unsorted input file \"" | argv[1] | "\""; 129 } catch( open_failure * ) { // open failed ? 130 exit | "Error! Could not open sorted output file \"" | argv[2] | "\""; 136 131 } catch( exception_t * ) { // catch any 137 132 exit | "Usage: " | argv[0] | // TERMINATE 138 133 " ( [ unsorted-file | 'd' [ sorted-file | 'd' [ depth (>= 0) ] ] ]" 139 134 " | -t size (>= 0) [ depth (>= 0) ] )"; 140 } // 135 } // try 141 136 142 137 enum { ValuesPerLine = 22 }; // number of values printed per line
Note: See TracChangeset
for help on using the changeset viewer.