* Fixed svn:eol-style and svn:keywords properties
[fw/sdcc] / device / lib / rand.c
index 1a267194100726de2b4e0c000adc00af4bbf47d6..a6c118f30032d6aeef41064435b50088e3eaee29 100644 (file)
@@ -1,38 +1,38 @@
-/*-------------------------------------------------------------------------\r
-   rand.c - random number generator\r
-\r
-   Written By - Maarten Brock, sourceforge.brock@dse.nl (2006)\r
-\r
-   This library is free software; you can redistribute it and/or\r
-   modify it under the terms of the GNU Lesser General Public\r
-   License as published by the Free Software Foundation; either\r
-   version 2.1 of the License, or (at your option) any later version.\r
-\r
-   This library is distributed in the hope that it will be useful,\r
-   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-   Lesser General Public License for more details.\r
-\r
-   You should have received a copy of the GNU Lesser General Public\r
-   License along with this library; if not, write to the Free Software\r
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
-\r
-   In other words, you are welcome to use, share and improve this program.\r
-   You are forbidden to forbid anyone else to use, share and improve\r
-   what you give them.   Help stamp out software-hoarding!\r
--------------------------------------------------------------------------*/\r
-\r
-#include <stdlib.h>\r
-\r
-static unsigned long int next = 1;\r
-\r
-int rand(void)\r
-{\r
-    next = next * 1103515245UL + 12345;\r
-    return (unsigned int)(next/65536) % (RAND_MAX + 1U);\r
-}\r
-\r
-void srand(unsigned int seed)\r
-{\r
-    next = seed;\r
-}\r
+/*-------------------------------------------------------------------------
+   rand.c - random number generator
+
+   Written By - Maarten Brock, sourceforge.brock@dse.nl (2006)
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+   In other words, you are welcome to use, share and improve this program.
+   You are forbidden to forbid anyone else to use, share and improve
+   what you give them.   Help stamp out software-hoarding!
+-------------------------------------------------------------------------*/
+
+#include <stdlib.h>
+
+static unsigned long int next = 1;
+
+int rand(void)
+{
+    next = next * 1103515245UL + 12345;
+    return (unsigned int)(next/65536) % (RAND_MAX + 1U);
+}
+
+void srand(unsigned int seed)
+{
+    next = seed;
+}