OpenCores
URL https://opencores.org/ocsvn/plasma/plasma/trunk

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [libc.c] - Diff between revs 399 and 407

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 399 Rev 407
Line 10... Line 10...
 *    Subset of the ANSI C library
 *    Subset of the ANSI C library
 *--------------------------------------------------------------------*/
 *--------------------------------------------------------------------*/
#define NO_ELLIPSIS
#define NO_ELLIPSIS
#include "rtos.h"
#include "rtos.h"
 
 
 
 
char *strcpy(char *dst, const char *src)
char *strcpy(char *dst, const char *src)
{
{
   char *dstSave=dst;
   char *dstSave=dst;
   int c;
   int c;
   do
   do
Line 181... Line 180...
{
{
   return n>=0 ? n : -n;
   return n>=0 ? n : -n;
}
}
 
 
 
 
#ifndef _LIBC
 
static uint32 Rand1=0x1f2bcda3;
static uint32 Rand1=0x1f2bcda3;
int rand(void)
int rand(void)
{
{
   Rand1 = 1664525 * Rand1 + 1013904223;  //from D.E. Knuth and H.W. Lewis
   Rand1 = 1664525 * Rand1 + 1013904223;  //from D.E. Knuth and H.W. Lewis
   return Rand1;
   return Rand1;
Line 401... Line 399...
         if(*s)
         if(*s)
            ++s;
            ++s;
      }
      }
   }
   }
}
}
#endif //_LIBC
 
 
 
 
 
#ifdef INCLUDE_DUMP
#ifdef INCLUDE_DUMP
/*********************** dump ***********************/
/*********************** dump ***********************/
void dump(const unsigned char *data, int length)
void dump(const unsigned char *data, int length)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.