Deleted Added
full compact
map.c (37199) map.c (39327)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 1366 unchanged lines hidden (view full) ---

1375 const char *help;
1376 el_func_t func;
1377{
1378 int nf = el->el_map.nfunc + 2;
1379 if (name == NULL || help == NULL || func == NULL)
1380 return -1;
1381
1382 el->el_map.func = (el_func_t *)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 1366 unchanged lines hidden (view full) ---

1375 const char *help;
1376 el_func_t func;
1377{
1378 int nf = el->el_map.nfunc + 2;
1379 if (name == NULL || help == NULL || func == NULL)
1380 return -1;
1381
1382 el->el_map.func = (el_func_t *)
1383 el_realloc(el->el_map.func, nf * sizeof(el_func_t));
1383 el_reallocf(el->el_map.func, nf * sizeof(el_func_t));
1384 el->el_map.help = (el_bindings_t *)
1384 el->el_map.help = (el_bindings_t *)
1385 el_realloc(el->el_map.help, nf * sizeof(el_bindings_t));
1385 el_reallocf(el->el_map.help, nf * sizeof(el_bindings_t));
1386
1387 nf = el->el_map.nfunc;
1388 el->el_map.func[nf] = func;
1389
1390 el->el_map.help[nf].name = name;
1391 el->el_map.help[nf].func = nf;
1392 el->el_map.help[nf].description = help;
1393 el->el_map.help[++nf].name = NULL;
1394 el->el_map.nfunc++;
1395
1396 return 0;
1397}
1386
1387 nf = el->el_map.nfunc;
1388 el->el_map.func[nf] = func;
1389
1390 el->el_map.help[nf].name = name;
1391 el->el_map.help[nf].func = nf;
1392 el->el_map.help[nf].description = help;
1393 el->el_map.help[++nf].name = NULL;
1394 el->el_map.nfunc++;
1395
1396 return 0;
1397}