Commits

Anonymous committed 4e0e5dc

Misc changes

Comments (0)

Files changed (11)

cmd/ossmix/ossmix.man

 mixer API which supports some device specific features that may not available
 using other mixer applications. 
 
-OPTIOMS
+OPTIONS
 -D		Display device information.
 -a		Dump mixer settings for all mixers (normal format).
 -c		Dump mixer settings for all mixers (command format).

cmd/osstest/osstest.man

 o Only stereo devices will be tested. Future versions of osstest will be
 able to test mono and multi channel devices too. Also osstest requires that
 the device supports the 16 bit signed format and 48kHz sampling rate.
+o Send a SIGQUIT (Ctrl-\e on most terminals) to make osstest skip a device.
 
 FILES
 /usr/bin/osstest

cmd/savemixer/savemixer.c

   n = 0;
   while (n < 3 && (fgets (line, sizeof (line), f) != NULL))
     {
-      for (i = 0; i < strlen (line); i++)
-	if (line[i] == '\n')
-	  line[i] = '\0';
+      s = strchr (line, '\n');
+      if (s != NULL) *s = '\0';
+
       m = 0;
-
       s = line;
       while (*s)
 	{

os_cmd/FreeBSD/ossdetect/ossdetect.c

 	}
 
       /* Drivers with upper case names are unsupported ones */
-      if (*line >= 'A' && *line <= 'Z')
+      if ((*line >= 'A' && *line <= 'Z') || (*line == '\0))
 	continue;
 
       driver = line;
   FILE *f;
   char line[256], tmp[300], *p, *s;
   mode_t perm;
+  int minor, major;
 
   if ((f = fopen ("/proc/opensound/devfiles", "r")) == NULL)
     {
   while (fgets (line, sizeof (line), f) != NULL)
     {
       char dev[64] = "/dev/";
-      int minor, major;
-      s = line + strlen (line) - 1;
-      *s = 0;
+
+      s = strchr (line, '\n');
+      if (s) *s = '\0';
 
       if (sscanf (line, "%s %d %d", dev + 5, &major, &minor) != 3)
 	{

os_cmd/Linux/ossdetect/ossdetect.c

       while (*p)
 	{
 	  if (*p == '#' || *p == '\n')
-	    *p = 0;
+	    *p = '\0';
 	  p++;
 	}
 
       /* Drivers with upper case names are unsupported ones */
-      if (*line >= 'A' && *line <= 'Z')
+      if ((*line >= 'A' && *line <= 'Z') || (*line == '\0'))
 	continue;
 
       driver = line;
   FILE *f;
   char line[256], tmp[300], *p, *s;
   mode_t perm;
+  int minor, major;
 
   if ((f = fopen ("/proc/opensound/devfiles", "r")) == NULL)
     {
   while (fgets (line, sizeof (line), f) != NULL)
     {
       char dev[64] = "/dev/";
-      int minor, major;
-      s = line + strlen (line) - 1;
-      *s = 0;
+
+      s = strchr (line, '\n');
+      if (s) *s = '\0';
 
       if (sscanf (line, "%s %d %d", dev + 5, &major, &minor) != 3)
 	{

os_cmd/SCO_SV/ossdetect/ossdetect.c

 	}
 
       /* Drivers with upper case names are unsupported ones */
-      if (*line >= 'A' && *line <= 'Z')
+      if ((*line >= 'A' && *line <= 'Z') || (*line == '\0'))
 	continue;
 
       driver = line;
 
   while (fgets (drvname, sizeof (drvname), drvf) != NULL)
     {
-      s = drvname + strlen (drvname) - 1;
-      *s = 0;			/* Remove the LF character */
+      s = strchr (drvname, '\n');
+      if (s) *s = '\0';			/* Remove the LF character */
 
       /* Remove the device full name (comment) field from the line */
       s = drvname;
       while (*s && *s != ' ' && *s != '#')
 	s++;
-      *s = 0;
+      *s = '\0';
+      if (*drvname == '\0') continue;
 
       sprintf (name, "/dev/%s0", drvname);
 

os_cmd/SunOS/ossdetect/ossdetect.c

 	}
 
       /* Drivers with upper case names are unsupported ones */
-      if (*line >= 'A' && *line <= 'Z')
+      if ((*line >= 'A' && *line <= 'Z') || (*line == '\0'))
 	continue;
 
       driver = line;
   if ((f = fopen ("/etc/name_to_major", "r")) == NULL)
     return;
 
-  while (fgets (line, sizeof (line) - 1, f) != NULL)
+  while (fgets (line, sizeof (line), f) != NULL)
     {
       p = line;
 
       while (*p && *p != ' ')
 	p++;
-      *p = 0;
+      *p = '\0';
+
+      if (*line == '\0') continue;
 
       if (nmods < MAX_MODS)
 	{
   if ((f = fopen (fname, "r")) == NULL)
     return;
 
-  while (fgets (line, sizeof (line) - 1, f) != NULL)
+  while (fgets (line, sizeof (line), f) != NULL)
     {
-      p = line + strlen (line) - 1;
-      *p = 0;
+      p = strchr (line, '\n');
+      if (p) *p = '\0';
       find_and_install_driver (line);
     }
 }

setup/Linux/confgen.c

   sprintf (tmp, "%s/.config", srcdir);
   if ((f = fopen (tmp, "r")) != NULL)
     {
-      while (fgets (line, sizeof (line) - 1, f) != NULL)
+      while (fgets (line, sizeof (line), f) != NULL)
 	{
 	  char *s;
 	  for (i = 0; i < strlen (line); i++)

setup/Linux/make.local

 	sh build.sh
 
 copy:	build
+	rm -f ${OSSLIBDIR}/modules/*.o
 	cp -R prototype/* /
 
 package:	build
 #include <stdlib.h>
 #include <unistd.h>
 #include <ctype.h>
+#include <time.h>
+#include <string.h>
 
 int section = 0;
 char *volume = "Unknown volume";
 int
 main (int argc, char *argv[])
 {
-  char line[1024], *s;
-  int upper;
+  char line[1024], *s, upper;
+  const char * date;
+  int c;
   FILE *f;
-  char date[32] = "August 31, 2006";
-
+  time_t tt;
   extern char *optarg;
   extern int optind;
-  int c;
+
+  if (time (&tt) == (time_t)-1) date = "August 31, 2006";
+  else {
+    date = ctime (&tt);
+    s = strchr (date, '\n');
+    if (s) *s = '\0';
+  }
 
   while ((c = getopt (argc, argv, "v:s:t:")) != EOF)
     switch (c)
     }
 
   printf (".\" Automatically generated text\n");
-  printf (".TH %d \"%s\" \"OSS\" \"%s\"\n", section, date, volume);
+  printf (".TH %s %d \"%s\" \"4Front Technologies\" \"%s\"\n", title, section, date, volume);
 
-  while (fgets (line, sizeof (line) - 1, f) != NULL)
+  while (fgets (line, sizeof (line), f) != NULL)
     {
       s = line;
       upper = 1;
       if (line[0] == 0)
 	upper = 0;
 
-      if (upper)
+      if (upper) {
 	printf (".SH %s\n", line);
-      else
-	{
+      } else {
 	  s = line;
 
-	  if (*s == 'o' && s[1] == ' ')
+	  while (isspace(*s)) s++;
+	  if (*s == '\0') {
+	    printf (".PP\n");
+	    continue;
+	  }
+	  if (*s == 'o' && isspace(s[1]))
 	    {
 	      printf (".IP \\(bu 3\n");
 	      s += 2;
 	      printf ("%s\n", s);
 	      continue;
 	    }
-	  if (*s == ' ')
-	    s++;
+	  if (*s == '-' && !isspace(s[1])) {
+            printf (".TP\n");
+            printf ("\\fB");
+            while (!isspace (*s)) printf ("%c", *s++);
+            printf ("\\fP\n");
+            while (isspace(*s)) s++;
+          }
 	  printf ("%s\n", s);
 	}
     }
 {
   char line[1024], *p, *s;
 
-  while (fgets (line, sizeof (line) - 1, f) != NULL)
+  while (fgets (line, sizeof (line), f) != NULL)
     {
       if (*line != '#')
 	continue;