Ignore:
Timestamp:
Sep 17, 2023, 11:19:08 AM (10 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
7edf912
Parents:
697c957
Message:

clean up command-line handling and I/O

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/actors/static.cfa

    r697c957 r50be8af  
    3333          case 2:
    3434                if ( strcmp( argv[1], "d" ) != 0 ) {                    // default ?
    35                         Times = atoi( argv[1] );
    36                         if ( Times < 1 ) goto Usage;
     35                        Times = ato( argv[1] );
     36                        if ( Times < 1 ) fallthru default;
    3737                } // if
    3838          case 1:                                                                                       // use defaults
    3939                break;
    4040          default:
    41           Usage:
    42                 sout | "Usage: " | argv[0] | " [ times (> 0) ]";
    43                 exit( EXIT_FAILURE );
     41                exit | "Usage: " | argv[0] | " [ times (> 0) ]";
    4442        } // switch
    4543
    46     printf("starting\n");
     44    sout | "starting";
    4745
    4846    executor e{ 0, 1, 1, false };
    4947    start_actor_system( e );
    5048
    51     printf("started\n");
     49    sout | "started";
    5250
    5351    derived_msg msg;
     
    5755    actor | msg;
    5856
    59     printf("stopping\n");
     57    sout | "stopping";
    6058
    6159    stop_actor_system();
    6260
    63     printf("stopped\n");
     61    sout | "stopped";
    6462
    6563    return 0;
Note: See TracChangeset for help on using the changeset viewer.