Changeset 10 in ntrip
- Timestamp:
- Jan 27, 2005, 8:38:04 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ntripclient/NtripLinuxClient.c
r9 r10 1 1 /* 2 2 Easy example NTRIP client for Linux/Unix. 3 $Id: NtripLinuxClient.c,v 1. 6 2004/12/13 16:41:41stoecker Exp $3 $Id: NtripLinuxClient.c,v 1.7 2005/01/03 11:33:39 stoecker Exp $ 4 4 Copyright (C) 2003 by Dirk Stoecker <stoecker@epost.de> 5 5 … … 18 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 or read http://www.gnu.org/licenses/gpl.txt 20 */21 22 /* Version history23 Please always keep revision history and the two related strings up to date!24 1.1 2003-02-24 stoecker initial version25 1.2 2003-02-25 stoecker fixed agent string26 1.6 2004-12-13 stoecker fixed server string27 1.7 2005-01-03 stoecker fixed for GNCaster access28 20 */ 29 21 … … 46 38 47 39 /* CVS revision and version */ 48 static char revisionstr[] = "$Revision: 1. 6$";49 static char datestr[] = "$Date: 200 4/12/13 16:41:41$";40 static char revisionstr[] = "$Revision: 1.7 $"; 41 static char datestr[] = "$Date: 2005/01/03 11:33:39 $"; 50 42 51 43 struct Args … … 273 265 } 274 266 else 267 { 275 268 fwrite(buf, numbytes, 1, stdout); 269 fflush(stdout); 270 } 276 271 } 277 272 } 278 273 else 279 274 { 280 while((numbytes=recv(sockfd, buf, MAXDATASIZE-1, 0)) != -1)275 while((numbytes=recv(sockfd, buf, MAXDATASIZE-1, 0)) > 0) 281 276 { 282 277 fwrite(buf, numbytes, 1, stdout); 283 if(!strncmp("ENDSOURCETABLE\r\n", buf+numbytes-16, 16)) break;284 if(!strncmp("\r\nENDSOURCETABLE\r\n", buf+numbytes-18, 18)) break;285 if(!strncmp("\r\nENDSOURCETABLE\r", buf+numbytes-17, 17)){fprintf(stdout, "\n"); break;}286 if(!strncmp("\r\nENDSOURCETABLE", buf+numbytes-16, 16)){fprintf(stdout, "\r\n"); break;}287 if(!strncmp("\r\nENDSOURCETABL", buf+numbytes-15, 15)){fprintf(stdout, "E\r\n"); break;}288 if(!strncmp("\r\nENDSOURCETAB", buf+numbytes-14, 14)){fprintf(stdout, "LE\r\n"); break;}289 if(!strncmp("\r\nENDSOURCETA", buf+numbytes-13, 13)){fprintf(stdout, "BLE\r\n"); break;}290 if(!strncmp("\r\nENDSOURCET", buf+numbytes-12, 12)){fprintf(stdout, "ABLE\r\n"); break;}291 if(!strncmp("\r\nENDSOURCE", buf+numbytes-11, 11)){fprintf(stdout, "TABLE\r\n"); break;}292 if(!strncmp("\r\nENDSOURC", buf+numbytes-10, 10)){fprintf(stdout, "ETABLE\r\n"); break;}293 if(!strncmp("\r\nENDSOUR", buf+numbytes-9, 9)){fprintf(stdout, "CETABLE\r\n"); break;}294 if(!strncmp("\r\nENDSOU", buf+numbytes-8, 8)){fprintf(stdout, "RCETABLE\r\n"); break;}295 if(!strncmp("\r\nENDSO", buf+numbytes-7, 7)){fprintf(stdout, "URCETABLE\r\n"); break;}296 if(!strncmp("\r\nENDS", buf+numbytes-6, 6)){fprintf(stdout, "OURCETABLE\r\n"); break;}297 if(!strncmp("\r\nEND", buf+numbytes-5, 5)){fprintf(stdout, "SOURCETABLE\r\n"); break;}298 if(!strncmp("\r\nEN", buf+numbytes-4, 4)){fprintf(stdout, "DSOURCETABLE\r\n"); break;}299 if(!strncmp("\r\nE", buf+numbytes-3, 3)){fprintf(stdout, "NDSOURCETABLE\r\n"); break;}300 278 } 301 279 }
Note:
See TracChangeset
for help on using the changeset viewer.