Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. libutil.c
  5. Abstract:
  6. Utility functions
  7. Environment:
  8. Windows NT printer drivers
  9. Revision History:
  10. 08/13/96 -davidx-
  11. Added CopyString functions and moved SPRINTF functions.
  12. 08/13/96 -davidx-
  13. Added devmode conversion routine and spooler API wrapper functions.
  14. 03/13/96 -davidx-
  15. Created it.
  16. --*/
  17. #include <lib.h>
  18. #if DBG
  19. //
  20. // Variable to control the amount of debug messages generated
  21. //
  22. INT giDebugLevel = DBG_WARNING;
  23. PCSTR
  24. StripDirPrefixA(
  25. IN PCSTR pstrFilename
  26. )
  27. /*++
  28. Routine Description:
  29. Strip the directory prefix off a filename (ANSI version)
  30. Arguments:
  31. pstrFilename - Pointer to filename string
  32. Return Value:
  33. Pointer to the last component of a filename (without directory prefix)
  34. --*/
  35. {
  36. PCSTR pstr;
  37. if (pstr = strrchr(pstrFilename, PATH_SEPARATOR))
  38. return pstr + 1;
  39. return pstrFilename;
  40. }
  41. #endif