projects
/
infodrom
/
dtaus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Corrections to data types, as found by Christian Zink <christian.zink@4students-ag...
[infodrom/dtaus]
/
dtaus.c
diff --git
a/dtaus.c
b/dtaus.c
index
78fcdaf
..
7c7ea71
100644
(file)
--- a/
dtaus.c
+++ b/
dtaus.c
@@
-234,7
+234,7
@@
char *strip_nondigits (char *s)
char dtaus_char (void *buf, unsigned int pos)
{
static char res;
char dtaus_char (void *buf, unsigned int pos)
{
static char res;
- char *bufp = buf;
+ char *bufp =
(char *)
buf;
bufp+=pos;
memcpy(&res, bufp, 1);
bufp+=pos;
memcpy(&res, bufp, 1);
@@
-346,7
+346,7
@@
char *ext2string (char *s)
unsigned long int dtaus_int(void *buf, unsigned int pos, unsigned int len)
{
char tmp[30];
unsigned long int dtaus_int(void *buf, unsigned int pos, unsigned int len)
{
char tmp[30];
- char *bufp = buf;
+ char *bufp =
(char *)
buf;
static unsigned long int res;
bufp+=pos;
static unsigned long int res;
bufp+=pos;
@@
-778,10
+778,15
@@
void printctln(FILE *f, char *field, char *value)
void printctlndate(FILE *f, char *field, char *value)
{
char mydate[11];
void printctlndate(FILE *f, char *field, char *value)
{
char mydate[11];
+ int i;
if (!strlen(field) || !strlen(value))
return;
if (!strlen(field) || !strlen(value))
return;
+ for (i=0;isspace (value[i]) && i<= strlen (value); i++);
+ if (i == strlen (value))
+ return;
+
memset (mydate, 0, sizeof (mydate));
if (strlen (value) == 6) {
mydate[0] = value[0];
memset (mydate, 0, sizeof (mydate));
if (strlen (value) == 6) {
mydate[0] = value[0];
@@
-819,8
+824,8
@@
void printctlndate(FILE *f, char *field, char *value)
void dtaus2control (char *cdtaus, char *ccontrol)
{
FILE *fdtaus, *fcontrol;
void dtaus2control (char *cdtaus, char *ccontrol)
{
FILE *fdtaus, *fcontrol;
-
void
*buf;
-
void
*bufp;
+
char
*buf;
+
char
*bufp;
char tmp[30];
char x[30];
int index;
char tmp[30];
char x[30];
int index;