I've been trying to run AT commands project, and have read many threads to ease the trouble. atinout (C-Program) offers lot of hope. But when I try to compile it with Turbo C++ I get the following error:
Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
atinout.c:
Error atinout.c 81: Declaration syntax error
*** 1 errors in Compile ***
Actual Program (Many thanks to expert Håkon Løvdal, for making it) Sorry, I've not put the entire code here.
Line 81: Starts at static bool tr_lf_cr(const char *s)
/* Replace '\n' with '\r', aka `tr '\012' '\015'` */
static bool tr_lf_cr(const char *s)
{
char *p;
p = strchr(s, '\n');
if (p == NULL || p[1] != '\0') {
return false;
}
*p = '\r';
return true;
}