shithub: sox

Download patch

ref: da9ecc9768c7ec97a7d29e4e8a2dcb3659685e92
parent: edd9e74cc053348989deab20158e65964f2f5a4b
author: cbagwell <cbagwell>
date: Thu Sep 30 11:44:24 EDT 2004

Removing use of non-portable strsep in mcompand.

--- a/src/mcompand.c
+++ b/src/mcompand.c
@@ -358,11 +358,14 @@
     return (ST_SUCCESS);
 }
 
-static int parse_subarg(char *s,char **subargv, int *subargc) {
+static int parse_subarg(char *s, char **subargv, int *subargc) {
   char **ap;
+  char *s_p;
 
+  s_p = s;
   *subargc = 0;
-  for (ap = subargv; (*ap = strsep(&s, " \t")) != NULL;) {
+  for (ap = subargv; (*ap = strtok(s_p, " \t")) != NULL;) {
+    s_p = NULL;
     if (*subargc == 5) {
       ++*subargc;
       break;