staticint MouseInit (void) ...{ int i; int fd =-1; Kmouse *km; KdMouseInfo *mi, *next; int n =0; char*prot;
if (!MouseInputType) MouseInputType = KdAllocInputType ();
for (mi = kdMouseInfo; mi; mi = next) ...{ next = mi->next; prot = mi->prot; if (mi->inputType) continue; if (!mi->name) ...{ for (i =0; i < NUM_DEFAULT_MOUSE; i++) ...{ if (kdNoSerialMouse && strstr(kdefaultMouse[i], "/dev/ttyS")) continue; fd = open (kdefaultMouse[i], 2); if (fd >=0) ...{ mi->name = KdSaveString (kdefaultMouse[i]); break; } } } else fd = open (mi->name, 2);