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.

65 lines
1.6 KiB

  1. /******************************************************************************
  2. Source File: Convert.C
  3. This is an NT Build hack. It includes all of the "C" files used for the
  4. converter, because Build can't handle directories beyond ..
  5. Copyright (c) 1997 by Microsoft Corporation. All Rights Reserved
  6. A Pretty Penny Enterprises Production
  7. Change History:
  8. 06-20-1997 Bob_Kjelgaard@Prodigy.Net Did the dirty deed
  9. ******************************************************************************/
  10. #include "..\GPC2GPD\PrEntry.C"
  11. #include "..\GPC2GPD\UiEntry.C"
  12. #include "..\GPC2GPD\Utils.C"
  13. #include "..\GPC2GPD\GPC2GPD.C"
  14. VOID
  15. CopyStringA(
  16. OUT PSTR pstrDest,
  17. IN PCSTR pstrSrc,
  18. IN INT iDestSize
  19. )
  20. /*++
  21. *
  22. * Routine Description:
  23. *
  24. * Copy ANSI string from source to destination
  25. *
  26. * Arguments:
  27. *
  28. * pstrDest - Points to the destination buffer
  29. * pstrSrc - Points to source string
  30. * iDestSize - Size of destination buffer (in characters)
  31. *
  32. * Return Value:
  33. *
  34. * NONE
  35. *
  36. * Note:
  37. *
  38. * If the source string is shorter than the destination buffer,
  39. * unused chars in the destination buffer is filled with NUL.
  40. *
  41. *
  42. --*/
  43. {
  44. PSTR pstrEnd;
  45. ASSERT(pstrDest && pstrSrc && iDestSize > 0);
  46. pstrEnd = pstrDest + (iDestSize - 1);
  47. while ((pstrDest < pstrEnd) && (*pstrDest++ = *pstrSrc++) != NUL)
  48. NULL;
  49. while (pstrDest <= pstrEnd)
  50. *pstrDest++ = NUL;
  51. }