Changes between Version 4 and Version 5 of DevelopersFAQ


Ignore:
Timestamp:
Aug 5, 2007, 7:59:21 PM (12 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersFAQ

    v4 v5  
    163163if needed. This is what the existing inline code does.
    164164
     165=== What is the purpose of quoting functions? ===
     166
     167Its purpose is to replace repeated occurances of code of the form
     168
     169
     170{{{
     171sprintf(cl, "%s %s%s%s", dcd->info->delete,
     172(needs_quoting(dcd->arcname)) ? "\"" : NullStr,
     173dcd->arcname,
     174(needs_quoting(dcd->arcname)) ? "\"" : NullStr);
     175}}}
     176
     177
     178and possibly
     179
     180
     181{{{
     182runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED,
     183hwnd, NULL, NULL, "%s %s%s%s", ad->info->test,
     184needs_quoting(ad->arcname) ? "\"" : NullStr,
     185ad->arcname,
     186needs_quoting(ad->arcname) ? "\"" : NullStr);
     187}}}
     188
     189
     190=== Where is the best place to do a check for? ===
     191
     192Since the check always needs to be done, it's generally better to do it in
     193the function.
     194
    165195----