Help pls. Error messages compiling a file using avr-gcc.

I haven’t any experience programming and writing code.
I like to upload a program to ATMega328p which reads the data from a digital caliper to an lcd screen.
I found the attached program. The program uses some libraries and file , I found all these , I have create a directory and I have put all these files inside and I have run the avr-gcc to compile ( hope to well done ).
With the avr-gcc I am trying compile the calipers.c file.
I foung the following command , which I have run:
avr-g++ -g -Os -Wall -mcall-prologues -mmcu=atmega328p -fno-exceptions -o calipers.obj calipers.c

the avr-gcc , seems to find the libraries and files but shows the following error message:

calipers.c : c154: error; expected primary-expression before “.” token
calipers.c : c159: error; expected primary-expression before “.” token

line 154 contents the following code ( see attatch file ):

FILE uart_stream = FDEV_SETUP_STREAM(uart_putchar, uart_getchar, _FDEV_SETUP_RW);
stdin = stdout = &uart_stream;

line 159 contents the following code :

FILE lcd_stream = FDEV_SETUP_STREAM(lcd_putchar, 0, _FDEV_SETUP_WRITE);

Could anyone help me what is the problem and how can fix it ?
Maybe is a syntax error at these lines ?

thanks for your help,
happy new year


calipers.c (4.48 KB)

Well, its not an Arduino sketch. Its like feeding hay to your cat. Just don't work.

-jim lee