Changeset e28175d in mainline for uspace/app/bdsh/scli.c


Ignore:
Timestamp:
2020-03-15T10:44:02Z (6 years ago)
Author:
GitHub <noreply@…>
Parents:
b401b33 (diff), 44dde42 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
heiducteam <tristanided@…> (2020-03-15 10:44:02)
git-committer:
GitHub <noreply@…> (2020-03-15 10:44:02)
Message:

Merge pull request #1 from HelenOS/master

sync

File:
1 edited

Legend:

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

    rb401b33 re28175d  
    11/*
    22 * Copyright (c) 2008 Tim Post
     3 * Copyright (c) 2018 Matthieu Riolo
    34 * All rights reserved.
    45 *
     
    3132#include <stddef.h>
    3233#include <str.h>
     34#include <adt/odict.h>
    3335#include "config.h"
    3436#include "scli.h"
     
    4244static iostate_t *iostate;
    4345static iostate_t stdiostate;
     46
     47odict_t alias_dict;
    4448
    4549/*
     
    5559 */
    5660const char *progname = PACKAGE_NAME;
     61
     62static int alias_cmp(void *a, void *b)
     63{
     64        return str_cmp((char *)a, (char *)b);
     65}
     66
     67static void *alias_key(odlink_t *odlink)
     68{
     69        return (void *)odict_get_instance(odlink, alias_t, odict)->name;
     70}
    5771
    5872/* These are not exposed, even to builtins */
     
    108122        iostate = &stdiostate;
    109123
     124        odict_initialize(&alias_dict, alias_key, alias_cmp);
     125
    110126        if (cli_init(&usr))
    111127                exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.