Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 60c332e in mainline for uspace/app/bdsh/scli.c


Ignore:
Timestamp:
2018-11-30T01:11:36Z (3 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master
Children:
4bf08aa5
Parents:
c483fca
Message:

adding basic logic for cmd alias

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/scli.c

    rc483fca r60c332e  
    3131#include <stddef.h>
    3232#include <str.h>
     33#include <adt/odict.h>
     34
    3335#include "config.h"
    3436#include "scli.h"
     
    4244static iostate_t *iostate;
    4345static iostate_t stdiostate;
     46
     47
     48odict_t alias_dict;
    4449
    4550/*
     
    5560 */
    5661const char *progname = PACKAGE_NAME;
     62
     63static int alias_cmp(void* a, void* b) {
     64        return str_cmp((char*)a, (char*)b);
     65}
     66
    5767
    5868/* These are not exposed, even to builtins */
     
    108118        iostate = &stdiostate;
    109119
     120
     121        odict_initialize(&alias_dict, alias_key, alias_cmp);
     122
    110123        if (cli_init(&usr))
    111124                exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.