error-messages from gcc
Hello,
I wanted to compile a terminal-program for the serial port.
But I got a number of error-messages.
Perhaps somebody can help me.
This is the Makefile I used:
terminal: terminal.c
gcc -ggdb terminal.c -o terminal
clean:
rm -f *.o
Here are the error-messages
terminal.c: in function `main`
terminal.c:95:20 invalid suffix "Parm_Count" on integer constant
terminal.c:277: error: stray `\311` in program
terminal.c:277: error: stray `\254` in program
terminal.c:277: error: stray `\341` in program
terminal.c:277: error: stray `\220` in program
....
Unfortunately I don`t understand the numbers: 95:20, 277.
Parm_Count is used as an argument of main( ). The Line has the number 34 and not 95.
The characters \311, \254, etc. don`t appear in the program.
Here are a few lines:
The program comes from comptechdoc.org (linux_pgcserial.html).
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/signal.h>
#include <sys/types.h>
#define BAUDRATE B38400
#define MODEMDEVICE "/dev/ttyS1"
#define _POSIX_SOURCE 1 //POSIX compliant source
#define FALSE 0
#define TRUE 1
volatile int STOP=FALSE;
void signal_handler_IO (int status); //definition of signal handler
int wait_flag=TRUE; //TRUE while no signal received
char devicename[80];
long Baud_Rate = 38400; // default Baud Rate (110 through 38400)
long BAUD; // derived baud rate from command line
long DATABITS;
long STOPBITS;
long PARITYON;
long PARITY;
int Data_Bits = 8; // Number of data bits
int Stop_Bits = 1; // Number of stop bits
int Parity = 0; // Parity as follows:
// 00 = NONE, 01 = Odd, 02 = Even, 03 = Mark, 04 = Space
int Format = 4;
FILE *input;
FILE *output;
int status;
main(int Parm_Count, char *Parms[])
{
char version[80] = " POSIX compliant Communications test program version 1.00 4-25-1999\r\n";
char version1[80] = " Copyright(C) Mark Zehner/Peter Baumann 1999\r\n";
char version2[80] = " This code is based on a DOS based t
.....
}
|