Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
b3a1c847
Commit
b3a1c847
authored
Apr 28, 1999
by
Per Cederqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(isc_puts): New function.
(isc_putul): New function.
parent
5c7f7e33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
src/libraries/libisc-new/src/isc.h
src/libraries/libisc-new/src/isc.h
+12
-0
src/libraries/libisc-new/src/isc_stdout.c
src/libraries/libisc-new/src/isc_stdout.c
+28
-0
No files found.
src/libraries/libisc-new/src/isc.h
View file @
b3a1c847
...
...
@@ -512,6 +512,18 @@ extern int
isc_putc
(
int
chr
,
IscSession
*
scb
);
/*
** Put a NUL-terminated string on the transmit queue (the NUL is not sent).
*/
extern
int
isc_puts
(
const
char
*
str
,
IscSession
*
scb
);
/*
** Put a decimal representation of ``nr'' on the transmit queue.
*/
extern
int
isc_putul
(
unsigned
long
nr
,
IscSession
*
scb
);
#ifdef ISC_PRINTF_SUPPORT
...
...
src/libraries/libisc-new/src/isc_stdout.c
View file @
b3a1c847
...
...
@@ -83,6 +83,34 @@ isc_write(IscSession * scb,
return
length
;
}
int
isc_puts
(
const
char
*
str
,
IscSession
*
scb
)
{
return
isc_write
(
scb
,
str
,
strlen
(
str
));
}
int
isc_putul
(
unsigned
long
nr
,
IscSession
*
scb
)
{
static
char
buf
[
sizeof
(
unsigned
long
)
*
3
+
1
];
char
*
cp
;
if
(
nr
<
10
)
return
isc_putc
(
"0123456789"
[
nr
],
scb
);
else
{
cp
=
buf
+
sizeof
(
buf
);
while
(
nr
>
0
)
{
*--
cp
=
(
nr
%
10
)
+
'0'
;
nr
/=
10
;
}
return
isc_write
(
scb
,
cp
,
buf
+
sizeof
(
buf
)
-
cp
);
}
}
#ifdef ISC_PRINTF_SUPPORT
...
...
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