Source code of Windows XP (NT5)
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.

76 lines
2.9 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: errinit.c
  3. *
  4. * Initialize the NURBS error string tables.
  5. *
  6. * Created: 18-Feb-1994 00:06:53
  7. * Author: Gilman Wong [gilmanw]
  8. *
  9. * Copyright (c) 1994 Microsoft Corporation
  10. *
  11. \**************************************************************************/
  12. #include <windows.h>
  13. #include "..\glu32\glstring.h"
  14. static UINT auiNurbsErrors[] = {
  15. STR_NURB_00, // " "
  16. STR_NURB_01, // "spline order un-supported"
  17. STR_NURB_02, // "too few knots"
  18. STR_NURB_03, // "valid knot range is empty"
  19. STR_NURB_04, // "decreasing knot sequence knot"
  20. STR_NURB_05, // "knot multiplicity greater than order of spline"
  21. STR_NURB_06, // "endcurve() must follow bgncurve()"
  22. STR_NURB_07, // "bgncurve() must precede endcurve()"
  23. STR_NURB_08, // "missing or extra geometric data"
  24. STR_NURB_09, // "can't draw pwlcurves"
  25. STR_NURB_10, // "missing or extra domain data"
  26. STR_NURB_11, // "missing or extra domain data"
  27. STR_NURB_12, // "endtrim() must precede endsurface()"
  28. STR_NURB_13, // "bgnsurface() must precede endsurface()"
  29. STR_NURB_14, // "curve of improper type passed as trim curve"
  30. STR_NURB_15, // "bgnsurface() must precede bgntrim()"
  31. STR_NURB_16, // "endtrim() must follow bgntrim()"
  32. STR_NURB_17, // "bgntrim() must precede endtrim()"
  33. STR_NURB_18, // "invalid or missing trim curve"
  34. STR_NURB_19, // "bgntrim() must precede pwlcurve()"
  35. STR_NURB_20, // "pwlcurve referenced twice"
  36. STR_NURB_21, // "pwlcurve and nurbscurve mixed"
  37. STR_NURB_22, // "improper usage of trim data type"
  38. STR_NURB_23, // "nurbscurve referenced twice"
  39. STR_NURB_24, // "nurbscurve and pwlcurve mixed"
  40. STR_NURB_25, // "nurbssurface referenced twice"
  41. STR_NURB_26, // "invalid property"
  42. STR_NURB_27, // "endsurface() must follow bgnsurface()"
  43. STR_NURB_28, // "intersecting or misoriented trim curves"
  44. STR_NURB_29, // "intersecting trim curves"
  45. STR_NURB_30, // "UNUSED"
  46. STR_NURB_31, // "unconnected trim curves"
  47. STR_NURB_32, // "unknown knot error"
  48. STR_NURB_33, // "negative vertex count encountered"
  49. STR_NURB_34, // "negative byte-stride encounteed"
  50. STR_NURB_35, // "unknown type descriptor"
  51. STR_NURB_36, // "null control point reference"
  52. STR_NURB_37 // "duplicate point on pwlcurve"
  53. };
  54. #define NERRORS ( sizeof(auiNurbsErrors)/sizeof(auiNurbsErrors[0]) )
  55. char *__glNurbsErrors[NERRORS];
  56. WCHAR *__glNurbsErrorsW[NERRORS];
  57. VOID vInitNurbStrings(HINSTANCE hMod, BOOL bAnsi)
  58. {
  59. int i;
  60. if (bAnsi)
  61. {
  62. for (i = 0; i < NERRORS; i++)
  63. __glNurbsErrors[i] = pszGetResourceStringA(hMod, auiNurbsErrors[i]);
  64. }
  65. else
  66. {
  67. for (i = 0; i < NERRORS; i++)
  68. __glNurbsErrorsW[i] = pwszGetResourceStringW(hMod, auiNurbsErrors[i]);
  69. }
  70. }