home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,416 of 243,242   
   Michael Sanders to Keith Thompson   
   Re: is_binary_file()   
   10 Dec 25 23:59:44   
   
   From: porkchop@invalid.foo   
      
   On Wed, 10 Dec 2025 15:20:19 -0800, Keith Thompson wrote:   
      
   > Michael Sanders  writes:   
   >> On Tue, 09 Dec 2025 15:42:59 -0800, Keith Thompson wrote:   
   >>   
   >>> [...]   
   >>   
   >> Keith if you get a chance see my reply to Lew 'is_text_file()'   
   >>   
   >> Let me know if I've inched closer a step or two...   
   >   
   > Closer to what exactly?   
   >   
   > In the parent article, I suggested that you likely don't need to   
   > determine whether a file is "text" or "binary".  You said you want   
   > to parse a file.  An attempt to parse it will fail either if the   
   > input is binary or if it's text that doesn't match the grammar you   
   > require.   For example, a parser for C source code doesn't need to   
   > check whether the input is binary or text.  Certain input   
   > characters will simply cause the parse to fail, and a syntax error   
   > can be reported.   Tell us more about how you want to parse files.   
   > Are you parsing according to a formal grammar?  Or is it more   
   > ad-hoc?   
      
   Yes I'm parsing a formal grammar (but a *really* small one).   
      
   Yes I can parse binary/text just fine as you guessed.   
      
   The matter at hand:   
      
   I wanted to build a stand alone function that makes a solid guess as   
   to whether a file would be considered an average text file or not.   
      
   That's all...   
      
   I've solved the issue to my satisfaction.   
      
   --   
   :wq   
   Mike Sanders   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca