Changeset e699eb6


Ignore:
Timestamp:
Aug 11, 2020, 1:47:19 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
42f1d739, 7ed1d8f
Parents:
e857743
Message:

Moved example parseargs to libcfa

Location:
libcfa/src
Files:
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • libcfa/src/Makefile.am

    re857743 re699eb6  
    4444
    4545headers = common.hfa fstream.hfa heap.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa \
    46                 time.hfa stdlib.hfa memory.hfa \
     46                time.hfa stdlib.hfa memory.hfa parseargs.hfa \
    4747                containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
    4848
  • libcfa/src/parseargs.cfa

    re857743 re699eb6  
    11#include "parseargs.hfa"
    22
    3 // #include <stdio.h>
    4 // #include <stdlib.h>
     3#include <stdint.h>
     4#include <string.h>
    55#include <errno.h>
    6 #include <string.h>
    76#include <unistd.h>
    87extern "C" {
     
    2221}
    2322
    24 #include <common.hfa>
    25 #include <limits.hfa>
     23#include "common.hfa"
     24#include "limits.hfa"
    2625
    2726void printopt(FILE * out, int width, int max, char sn, const char * ln, const char * help) {
     
    6766                        }
    6867                }
    69                 optarr[idx+0].[name, has_arg, flag, val] = ["help", no_argument, 0p, 'h'];
    70                 optarr[idx+1].[name, has_arg, flag, val] = [0p, no_argument, 0p, 0];
     68                optarr[idx+0].[name, has_arg, flag, val] = ["help", no_argument, 0, 'h'];
     69                optarr[idx+1].[name, has_arg, flag, val] = [0, no_argument, 0, 0];
    7170        }
    7271
Note: See TracChangeset for help on using the changeset viewer.