forked from mirror/OpenTTD
(svn r3380) -Fix: removed 'size' from r3379, because it was pretty silly
-Note: no longer showhelp publish -p, as it is deprecated
This commit is contained in:
14
driver.c
14
driver.c
@@ -206,23 +206,19 @@ int GetDriverParamInt(const char* const* parm, const char* name, int def)
|
||||
}
|
||||
|
||||
|
||||
int GetDriverList(char* p, int size)
|
||||
char *GetDriverList(char* p)
|
||||
{
|
||||
const DriverClass* dc;
|
||||
int pos;
|
||||
|
||||
for (dc = _driver_classes; dc != endof(_driver_classes); dc++) {
|
||||
const DriverDesc* dd;
|
||||
|
||||
pos = snprintf(p, size, "List of %s drivers:\n", dc->name);
|
||||
p += pos; size -= pos;
|
||||
p += sprintf(p, "List of %s drivers:\n", dc->name);
|
||||
for (dd = dc->descs; dd->name != NULL; dd++) {
|
||||
pos = snprintf(p, size, "%10s: %s\n", dd->name, dd->longname);
|
||||
p += pos; size -= pos;
|
||||
p += sprintf(p, "%10s: %s\n", dd->name, dd->longname);
|
||||
}
|
||||
pos = snprintf(p, size, "\n");
|
||||
p += pos; size -= pos;
|
||||
p += sprintf(p, "\n");
|
||||
}
|
||||
|
||||
return size;
|
||||
return p;
|
||||
}
|
||||
|
Reference in New Issue
Block a user