summaryrefslogtreecommitdiff
path: root/libps/write.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-04-07 19:53:55 +0000
committerMiles Bader <miles@gnu.org>1995-04-07 19:53:55 +0000
commit9324d172e36299308083acd89595f5afbd92bacd (patch)
tree4f91a9f21a55e6d7170438b79ce5105643f19d73 /libps/write.c
parent7e4142fb0a375c29aee7224cbccbf734fdefbcd5 (diff)
Tighten up types used (i.e., don't use int for everything).
Diffstat (limited to 'libps/write.c')
-rw-r--r--libps/write.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libps/write.c b/libps/write.c
index b28ccca6..486352d2 100644
--- a/libps/write.c
+++ b/libps/write.c
@@ -33,7 +33,7 @@
written is added to the integer it points to. If an error occurs, the
error code is returned, otherwise 0. */
error_t
-ps_write_string(char *string, int max_len, FILE *stream, int *count)
+ps_write_string(char *string, int max_len, FILE *stream, unsigned *count)
{
int len = strlen(string);
@@ -56,7 +56,7 @@ ps_write_string(char *string, int max_len, FILE *stream, int *count)
written is added to the integer it points to. If an error occurs, the
error code is returned, otherwise 0. */
error_t
-ps_write_spaces(int num, FILE *stream, int *count)
+ps_write_spaces(int num, FILE *stream, unsigned *count)
{
static char spaces[] = " ";
#define spaces_len (sizeof(spaces) - 1)
@@ -81,7 +81,7 @@ ps_write_spaces(int num, FILE *stream, int *count)
it points to. If an error occurs, the error code is returned, otherwise
0. */
error_t
-ps_write_padding(int sofar, int width, FILE *stream, int *count)
+ps_write_padding(int sofar, int width, FILE *stream, unsigned *count)
{
width = ABS(width);
if (sofar < width)
@@ -96,7 +96,7 @@ ps_write_padding(int sofar, int width, FILE *stream, int *count)
characters written is added to the integer it points to. If an error
occurs, the error code is returned, otherwise 0. */
error_t
-ps_write_field(char *buf, int width, FILE *stream, int *count)
+ps_write_field(char *buf, int width, FILE *stream, unsigned *count)
{
error_t err;
int len = strlen(buf);
@@ -125,7 +125,7 @@ ps_write_field(char *buf, int width, FILE *stream, int *count)
non-NULL, the number of characters written is added to the integer it
points to. If an error occurs, the error code is returned, otherwise 0. */
error_t
-ps_write_int_field(int value, int width, FILE *stream, int *count)
+ps_write_int_field(int value, int width, FILE *stream, unsigned *count)
{
char buf[20];
sprintf(buf, "%d", value);