--- a/driver.c Fri Jan 06 22:52:31 2006 +0000
+++ b/driver.c Sat Jan 07 10:15:46 2006 +0000
@@ -206,23 +206,19 @@
}
-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;
}