Convert crlf->lf line endings.
[mesa.git] / src / glut / os2 / glut_bitmap.cpp
index 789a89ae73e968ef9be23159162e804a013c6d79..40530b69c1381e5dd61a00cb888687e24a1e3903 100644 (file)
@@ -1,57 +1,57 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1994. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include "glutint.h"\r
-#include "glutbitmap.h"\r
-\r
-void GLUTAPIENTRY\r
-glutBitmapCharacter(GLUTbitmapFont font, int c)\r
-{\r
-  const BitmapCharRec *ch;\r
-  BitmapFontPtr fontinfo;\r
-  GLint swapbytes, lsbfirst, rowlength;\r
-  GLint skiprows, skippixels, alignment;\r
-\r
-#if defined(_WIN32)\r
-  fontinfo = (BitmapFontPtr) __glutFont(font);\r
-#else\r
-  fontinfo = (BitmapFontPtr) font;\r
-#endif\r
-\r
-  if (c < fontinfo->first ||\r
-    c >= fontinfo->first + fontinfo->num_chars)\r
-    return;\r
-  ch = fontinfo->ch[c - fontinfo->first];\r
-  if (ch) {\r
-    /* Save current modes. */\r
-    glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes);\r
-    glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst);\r
-    glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength);\r
-    glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows);\r
-    glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels);\r
-    glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);\r
-    /* Little endian machines (DEC Alpha for example) could\r
-       benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE\r
-       instead of GL_FALSE, but this would require changing the\r
-       generated bitmaps too. */\r
-    glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);\r
-    glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);\r
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);\r
-    glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);\r
-    glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);\r
-    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\r
-    glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,\r
-      ch->advance, 0, ch->bitmap);\r
-    /* Restore saved modes. */\r
-    glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes);\r
-    glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst);\r
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength);\r
-    glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows);\r
-    glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);\r
-    glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);\r
-  }\r
-}\r
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* This program is freely distributable without licensing fees
+   and is provided without guarantee or warrantee expressed or
+   implied. This program is -not- in the public domain. */
+
+#include "glutint.h"
+#include "glutbitmap.h"
+
+void GLUTAPIENTRY
+glutBitmapCharacter(GLUTbitmapFont font, int c)
+{
+  const BitmapCharRec *ch;
+  BitmapFontPtr fontinfo;
+  GLint swapbytes, lsbfirst, rowlength;
+  GLint skiprows, skippixels, alignment;
+
+#if defined(_WIN32)
+  fontinfo = (BitmapFontPtr) __glutFont(font);
+#else
+  fontinfo = (BitmapFontPtr) font;
+#endif
+
+  if (c < fontinfo->first ||
+    c >= fontinfo->first + fontinfo->num_chars)
+    return;
+  ch = fontinfo->ch[c - fontinfo->first];
+  if (ch) {
+    /* Save current modes. */
+    glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes);
+    glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst);
+    glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength);
+    glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows);
+    glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels);
+    glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+    /* Little endian machines (DEC Alpha for example) could
+       benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE
+       instead of GL_FALSE, but this would require changing the
+       generated bitmaps too. */
+    glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
+    glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
+    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+    glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+    glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,
+      ch->advance, 0, ch->bitmap);
+    /* Restore saved modes. */
+    glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes);
+    glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst);
+    glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength);
+    glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows);
+    glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
+  }
+}