summaryrefslogtreecommitdiff
path: root/driver.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-01-07 10:15:46 +0000
committertruelight <truelight@openttd.org>2006-01-07 10:15:46 +0000
commite373bd02ba35dc1a75eea3913345640de8d054b6 (patch)
tree5c512be4c7678472490d7084fd58836986554427 /driver.c
parent835cd6ea2897fed19bcdbdf5f237102a22065502 (diff)
downloadopenttd-e373bd02ba35dc1a75eea3913345640de8d054b6.tar.xz
(svn r3380) -Fix: removed 'size' from r3379, because it was pretty silly
-Note: no longer showhelp publish -p, as it is deprecated
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/driver.c b/driver.c
index 998f8a90d..4faf41fa1 100644
--- a/driver.c
+++ b/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;
}