diff src/oct-parse.yy @ 12918:f3a8d1efe2c1 stable

use gnulib:: qualifiers for more stdio functions * oct-parse.yy (text_getc): Use gnulib::getc instead of getc. (looking_at_classdef_keyword, looking_at_funciton_keyword): Use gnulib::ftell, gnulib::fseek, and gnulib::fgets instead of ftell, fseek, and fgets. * file-io.cc (Fmkstemp): Use gnulib::mkstemp instead of mkstemp. * lo-utils.cc (octave_fgets): Use gnulib::fgets instead of fgets. * c-file-ptr-stream.h (c_file_ptr_buf::seek): Use gnulib::fseek instead of fseek. (c_file_ptr_buf::tell): Use gnulib::ftell instead of ftell.
author John W. Eaton <jwe@octave.org>
date Thu, 04 Aug 2011 10:39:37 -0400
parents 7b5bfd6a8e28
children 61906c0d1e9b 8b5b85e26246
line wrap: on
line diff
--- a/src/oct-parse.yy	Wed Aug 03 13:56:53 2011 -0400
+++ b/src/oct-parse.yy	Thu Aug 04 10:39:37 2011 -0400
@@ -3287,13 +3287,13 @@
 static int
 text_getc (FILE *f)
 {
-  int c = getc (f);
+  int c = gnulib::getc (f);
 
   // Convert CRLF into just LF and single CR into LF.
 
   if (c == '\r')
     {
-      c = getc (f);
+      c = gnulib::getc (f);
 
       if (c != '\n')
         {
@@ -3368,16 +3368,16 @@
 {
   bool status = false;
 
-  long pos = ftell (ffile);
+  long pos = gnulib::ftell (ffile);
 
   char buf [10];
-  fgets (buf, 10, ffile);
+  gnulib::fgets (buf, 10, ffile);
   size_t len = strlen (buf);
   if (len > 8 && strncmp (buf, "classdef", 8) == 0
       && ! (isalnum (buf[8]) || buf[8] == '_'))
     status = true;
 
-  fseek (ffile, pos, SEEK_SET);
+  gnulib::fseek (ffile, pos, SEEK_SET);
 
   return status;
  }
@@ -3428,16 +3428,16 @@
 {
   bool status = false;
 
-  long pos = ftell (ffile);
+  long pos = gnulib::ftell (ffile);
 
   char buf [10];
-  fgets (buf, 10, ffile);
+  gnulib::fgets (buf, 10, ffile);
   size_t len = strlen (buf);
   if (len > 8 && strncmp (buf, "function", 8) == 0
       && ! (isalnum (buf[8]) || buf[8] == '_'))
     status = true;
 
-  fseek (ffile, pos, SEEK_SET);
+  gnulib::fseek (ffile, pos, SEEK_SET);
 
   return status;
 }