- cleaned up makefiles
- polished code to avoid warnings
This commit is contained in:
@ -336,7 +336,7 @@
|
||||
{
|
||||
fSet = fVal;
|
||||
iSet = (int)(fSet*self->fMult);
|
||||
sprintf(pCommand,"T%05.5d\r\n",iSet);
|
||||
sprintf(pCommand,"T%5.5d\r\n",iSet);
|
||||
}
|
||||
|
||||
/* try three times: send, read, test, if OK return, else
|
||||
|
@ -8,9 +8,6 @@
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
VPATH=$(SRC)
|
||||
ROOT=../..
|
||||
|
||||
OBJ= el734_utility.o asynsrv_utility.o stredit.o \
|
||||
strjoin.o failinet.o geterrno.o el737_utility.o sinqhm.o serialsinq.o \
|
||||
itc4util.o dillutil.o table.o el755_utility.o el755_errorlog.o \
|
||||
|
@ -1,15 +1,6 @@
|
||||
# Forwards the execution to a version specific makefile.
|
||||
# SICS_VERSION must be defined, else usage is printed
|
||||
# M. Zolliker 03.2005
|
||||
|
||||
VERS_UNDEFINED=
|
||||
VERS_UNDEFINED$(SICS_VERSION)=version_undefined
|
||||
|
||||
INCL_MF=makefile_$(SICS_VERSION)
|
||||
|
||||
-include $(INCL_MF)
|
||||
|
||||
version_undefined:
|
||||
default:
|
||||
@ echo ""
|
||||
@ echo "Usage:"
|
||||
@ echo ""
|
||||
@ -18,17 +9,4 @@ version_undefined:
|
||||
@ echo ' where makefile_xxx is one of'
|
||||
@ echo ""
|
||||
@ ls -1 makefile_* | pr -t -o 4
|
||||
@ echo ""
|
||||
@ echo "Or, more convenient, define the following in the login script"
|
||||
@ echo ""
|
||||
@ echo " setenv SICS_VERSION version_xxx (assume we are using tcsh)"
|
||||
@ echo ""
|
||||
@ echo " where version_xxx is one of"
|
||||
@ echo ""
|
||||
@ ls -1 makefile_* | cut -b 10-99 | pr -t -o 4
|
||||
@ echo ""
|
||||
@ echo "and then use simply"
|
||||
@ echo ""
|
||||
@ echo " make [target]"
|
||||
@ echo ""
|
||||
|
||||
|
@ -9,6 +9,6 @@
|
||||
include ../../alpha_def
|
||||
|
||||
CC = cc
|
||||
CFLAGS = -std1 -g $(DFORTIFY) -I$(SRC).
|
||||
CFLAGS = -std1 -g $(DFORTIFY) -I.
|
||||
|
||||
include make_gen
|
||||
|
@ -6,9 +6,9 @@
|
||||
# Markus Zolliker, March 2003
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
include ../../$(SRC)linux_def
|
||||
include ../../linux_def
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -g -DLINUX $(DFORTIFY) -I$(SRC).
|
||||
CFLAGS = -g -DLINUX $(DFORTIFY) -I. -Wall -Wno-unused
|
||||
|
||||
include $(SRC)make_gen
|
||||
include make_gen
|
||||
|
@ -194,7 +194,7 @@
|
||||
case '\015': *pntr++ = '\\'; *pntr++ = 'r'; break;
|
||||
default:
|
||||
if ((in < ' ') || (in > '~')) {
|
||||
pntr += sprintf (pntr, "\\%03.3o", in);
|
||||
pntr += sprintf (pntr, "\\%3.3o", in);
|
||||
}else {
|
||||
*pntr++ = in;
|
||||
}
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -371,11 +372,11 @@
|
||||
|
||||
info_ptr->msg_id++; /* Set up an incrementing message id */
|
||||
if (info_ptr->msg_id > 9999) info_ptr->msg_id = 1;
|
||||
sprintf (info_ptr->to_host.msg_id, "%04.4d", info_ptr->msg_id);
|
||||
sprintf (info_ptr->to_host.msg_id, "%4.4d", info_ptr->msg_id);
|
||||
|
||||
memcpy (info_ptr->to_host.c_pcol_lvl, RS__PROTOCOL_ID_V01B,
|
||||
sizeof (info_ptr->to_host.c_pcol_lvl));
|
||||
sprintf (info_ptr->to_host.serial_port, "%04.4d", info_ptr->chan);
|
||||
sprintf (info_ptr->to_host.serial_port, "%4.4d", info_ptr->chan);
|
||||
sprintf (info_ptr->to_host.tmo, "%04d", info_ptr->tmo);
|
||||
|
||||
strncpy(info_ptr->sAsync.eot,info_ptr->pTerms,4);
|
||||
@ -407,20 +408,20 @@
|
||||
{
|
||||
c_len = strlen (txt_ptr);
|
||||
}
|
||||
sprintf (text, "%04.4d", c_len);
|
||||
sprintf (text, "%4.4d", c_len);
|
||||
memcpy (cmnd_lst_ptr, text, 4);
|
||||
cmnd_lst_ptr = cmnd_lst_ptr + c_len + 4;
|
||||
ncmnds++;
|
||||
bytes_left = bytes_left - size;
|
||||
}
|
||||
|
||||
sprintf (text, "%04.4d", ncmnds);
|
||||
sprintf (text, "%4.4d", ncmnds);
|
||||
memcpy (info_ptr->to_host.n_cmnds,
|
||||
text, sizeof (info_ptr->to_host.n_cmnds));
|
||||
|
||||
size = cmnd_lst_ptr - info_ptr->to_host.msg_id;
|
||||
size = (size + 3) & (~3); /* Round up to multiple of 4 */
|
||||
sprintf (text, "%04.4d", size);
|
||||
sprintf (text, "%4.4d", size);
|
||||
memcpy (info_ptr->to_host.msg_size, text, 4);
|
||||
|
||||
status = send (info_ptr->skt, (char *) &info_ptr->to_host, size+4, 0);
|
||||
|
Reference in New Issue
Block a user