Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
d684c433
Commit
d684c433
authored
Apr 12, 2002
by
rswindell
Browse files
Added ultoa implementation (from src/sbbs3/wrappers.c).
parent
10c5b37e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
src/xpdev/genwrap.c
src/xpdev/genwrap.c
+25
-0
No files found.
src/xpdev/genwrap.c
View file @
d684c433
...
...
@@ -132,6 +132,31 @@ int DLLCALL xp_random(int n)
return
((
int
)(
n
*
f
));
}
/****************************************************************************/
/* Return ASCII string representation of ulong */
/* There may be a native GNU C Library function to this... */
/****************************************************************************/
#if !defined _MSC_VER && !defined __BORLANDC__
char
*
DLLCALL
ultoa
(
ulong
val
,
char
*
str
,
int
radix
)
{
switch
(
radix
)
{
case
8
:
sprintf
(
str
,
"%lo"
,
val
);
break
;
case
10
:
sprintf
(
str
,
"%lu"
,
val
);
break
;
case
16
:
sprintf
(
str
,
"%lx"
,
val
);
break
;
default:
sprintf
(
str
,
"bad radix: %d"
,
radix
);
break
;
}
return
(
str
);
}
#endif
/****************************************************************************/
/* Write the version details of the current operating system into str */
/****************************************************************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment