Revision 1564

trunk/src/nh99/model7.cpp (revision 1564)
296 296
  directory_prefix='/';
297 297
#endif
298 298
  adstring tmpstring;
299
  // remove path (if __SPDLL__ is not defined)
299

  
300 300
#if !defined(__SPDLL__)
301
  //remove path
301 302
  for (int i = adprogram_name.size(); i >= 1; i--)
302 303
  {
303 304
    if (adprogram_name(i)==directory_prefix)
......
308 309
  }
309 310

  
310 311
#endif
311
  // strip off the .exe if it is there
312
  int n=adprogram_name.size();
313
  if(n>4)
312

  
313
#if defined (_WIN32)
314
  // strip off the .exe
315
  int n = adprogram_name.size();
316
  if (n > 4)
314 317
  {
315 318
    if (adprogram_name(n - 3) == '.'
316
        && adprogram_name(n - 2) == 'e'
317
        && adprogram_name(n - 1) == 'x'
318
        && adprogram_name(n) == 'e')
319
        && tolower(adprogram_name(n - 2)) == 'e'
320
        && tolower(adprogram_name(n - 1)) == 'x'
321
        && tolower(adprogram_name(n)) == 'e')
319 322
    {
320 323
      n -= 4;
321 324
    }
322 325
  }
323 326
  adprogram_name=adprogram_name(1,n);
327
#endif
324 328

  
325 329
  // change the working directory name
326 330
  if (argc > 1)

Also available in: Unified diff