-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1643 from jimklimov/Windows-v2.8.0-3
Revisit NUT for Windows v2.8.0 branch after upslog update
- Loading branch information
Showing
6 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <string.h> | ||
|
||
/* Simple implem courtesy of https://stackoverflow.com/a/58244503 | ||
* Note: like the (BSD) standard implem, this changes the original stringp! | ||
* Result is undefined (segfault here) if stringp==NULL | ||
* (it is supposed to be address of string after all) | ||
*/ | ||
char *strsep(char **stringp, const char *delim) { | ||
char *rv = *stringp; | ||
if (rv) { | ||
*stringp += strcspn(*stringp, delim); | ||
if (**stringp) | ||
*(*stringp)++ = '\0'; | ||
else | ||
*stringp = NULL; | ||
} | ||
return rv; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters