To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10592
10591  |  10593
Subject: 
Re: Getting rif off the 8.3 nomenclature??? (scanf tricks)
Newsgroups: 
lugnet.cad.dat.parts, lugnet.cad.dev
Date: 
Thu, 29 Mar 2007 01:26:16 GMT
Viewed: 
1485 times
  
In lugnet.cad.dat.parts, Jim DeVona wrote:
   In lugnet.cad.dat.parts, Kevin L. Clague wrote:

   Given that sscanf splits things up by whitespace, I think LPub and LSynth would misparse file names with blanks or tabs in them.

As I said, Willy has a good argument, and well worthy of consideration.

I think that as long as there is embedded white space is not allowed, the change will be backward compatible and not cause problems (at least not for LPub and LSynth).

I have no idea whether this could be worked into your sscanf usage, but it is possible to read whitespace into strings with the scanf functions using scanlists (sets of [valid] or [^invalid] characters). It’s not the most elegant solution, but here’s a simplistic C example anyway:

snip
  
Anyway, I would agree that there really need not be any whitespace in the official part library filenames. However, I do find 8.3 character filename limitations exceptionally archaic, and as an end user I do like to use natural whitespace instead of hyphens or underscores in filenames (LDraw models or otherwise). So, thought I’d share this C trivia just in case it helps lead to an easier-ish solution.

Be well,

Jim

Hi Jim,

Thanks!

I’ll use it.

Kevin



Message has 1 Reply:
  Re: Getting rif off the 8.3 nomenclature??? (scanf tricks)
 
(...) That's a nifty scanf trick. But don't forget, you might still want to (URL) trim leading and trailing whitespace> (tabs and space characters) from the parsed filename (and maybe even surrounding quotes). Don (17 years ago, 29-Mar-07, to lugnet.cad.dat.parts, lugnet.cad.dev, FTX)

Message is in Reply To:
  Re: Getting rif off the 8.3 nomenclature??? (scanf tricks)
 
(...) misparse file names with blanks or tabs in them. (...) will be backward compatible and not cause problems (at least not for (...) I have no idea whether this could be worked into your sscanf usage, but it is possible to read whitespace into (...) (17 years ago, 29-Mar-07, to lugnet.cad.dat.parts, lugnet.cad.dev, FTX)

25 Messages in This Thread:








Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR