Changes in uspace/app/bdsh/scli.c [09ab0a9a:a02aa5c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/scli.c
r09ab0a9a ra02aa5c 1 1 /* 2 2 * Copyright (c) 2008 Tim Post 3 * Copyright (c) 2018 Matthieu Riolo 3 4 * All rights reserved. 4 5 * … … 31 32 #include <stddef.h> 32 33 #include <str.h> 34 #include <adt/odict.h> 33 35 #include "config.h" 34 36 #include "scli.h" … … 42 44 static iostate_t *iostate; 43 45 static iostate_t stdiostate; 46 47 odict_t alias_dict; 44 48 45 49 /* … … 55 59 */ 56 60 const char *progname = PACKAGE_NAME; 61 62 static int alias_cmp(void *a, void *b) 63 { 64 return str_cmp((char *)a, (char *)b); 65 } 66 67 static void *alias_key(odlink_t *odlink) 68 { 69 return (void *)odict_get_instance(odlink, alias_t, odict)->name; 70 } 57 71 58 72 /* These are not exposed, even to builtins */ … … 108 122 iostate = &stdiostate; 109 123 124 odict_initialize(&alias_dict, alias_key, alias_cmp); 125 110 126 if (cli_init(&usr)) 111 127 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.