cpp1.c (f013d992) | cpp1.c (cf09c872) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 315 unchanged lines hidden (view full) --- 324 if (!streq(useargv[1], "-")) { 325/* alt: if (freopen(useargv[1], "r", stdin) == NULL) { */ 326 pCppIn = fopen( useargv[1], "r" ); 327 if( pCppIn == NULL) { 328 perror(useargv[1]); 329 cerror("Can't open input file \"%s\"", useargv[1]); 330 exit(IO_ERROR); 331 } | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 315 unchanged lines hidden (view full) --- 324 if (!streq(useargv[1], "-")) { 325/* alt: if (freopen(useargv[1], "r", stdin) == NULL) { */ 326 pCppIn = fopen( useargv[1], "r" ); 327 if( pCppIn == NULL) { 328 perror(useargv[1]); 329 cerror("Can't open input file \"%s\"", useargv[1]); 330 exit(IO_ERROR); 331 } |
332 strncpy(work, useargv[1], sizeof(work)); /* Remember input filename */ | 332 strncpy(work, useargv[1], NWORK+1); /* Remember input filename */ 333 work[NWORK] = '\0'; |
333 break; 334 } /* Else, just get stdin */ 335 case 0: /* No args? */ 336 case 1: /* No files, stdin -> stdout */ 337#if (HOST == SYS_UNIX) || (HOST == SYS_UNKNOWN) 338 work[0] = EOS; /* Unix can't find stdin name */ 339#else 340 fgetname(stdin, work); /* Vax-11C, Decus C know name */ --- 272 unchanged lines hidden --- | 334 break; 335 } /* Else, just get stdin */ 336 case 0: /* No args? */ 337 case 1: /* No files, stdin -> stdout */ 338#if (HOST == SYS_UNIX) || (HOST == SYS_UNKNOWN) 339 work[0] = EOS; /* Unix can't find stdin name */ 340#else 341 fgetname(stdin, work); /* Vax-11C, Decus C know name */ --- 272 unchanged lines hidden --- |