Switch from K&R prototypes to modern C
Reviewed by: jilles Approved by: cperciva (mentor) MFC After: 3 days
This commit is contained in:
parent
48e512f27e
commit
240f872cb8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249801
@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
* sl_init(): Initialize a string list
|
* sl_init(): Initialize a string list
|
||||||
*/
|
*/
|
||||||
StringList *
|
StringList *
|
||||||
sl_init()
|
sl_init(void)
|
||||||
{
|
{
|
||||||
StringList *sl;
|
StringList *sl;
|
||||||
|
|
||||||
@ -67,9 +67,7 @@ sl_init()
|
|||||||
* sl_add(): Add an item to the string list
|
* sl_add(): Add an item to the string list
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sl_add(sl, name)
|
sl_add(StringList *sl, char *name)
|
||||||
StringList *sl;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
if (sl->sl_cur == sl->sl_max - 1) {
|
if (sl->sl_cur == sl->sl_max - 1) {
|
||||||
sl->sl_max += _SL_CHUNKSIZE;
|
sl->sl_max += _SL_CHUNKSIZE;
|
||||||
@ -86,9 +84,7 @@ sl_add(sl, name)
|
|||||||
* sl_free(): Free a stringlist
|
* sl_free(): Free a stringlist
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
sl_free(sl, all)
|
sl_free(StringList *sl, int all)
|
||||||
StringList *sl;
|
|
||||||
int all;
|
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
@ -108,9 +104,7 @@ sl_free(sl, all)
|
|||||||
* sl_find(): Find a name in the string list
|
* sl_find(): Find a name in the string list
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
sl_find(sl, name)
|
sl_find(StringList *sl, char *name)
|
||||||
StringList *sl;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user