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

Subversion Repositories 1664

[/] [1664/] [trunk/] [c/] [lista/] [nN_trova__p_n4.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mrdmkg
#include "tipodef.h"
2
 
3
nN nN_trova__p_n4(n4 *cadena, nN cuantia, n4 sinia)
4
{
5
 #define limite_minima 32
6
 nN i=0;
7
 if(cuantia!=0)
8
 {
9
 
10
  if((cuantia&1)=1)
11
  {
12
 
13
   if((*cadena++)==sinia)
14
   {
15
    break;
16
   }
17
  }
18
 
19
  if(cuantia<limite_minima)
20
  {
21
 
22
   for(i=0;i<cuantia;i++)
23
   {
24
 
25
    if (cadena[i]==sinia)
26
    {
27
     contador=i+1;
28
     break;
29
    }
30
   }
31
  }
32
  else
33
  {
34
   contador
35
  }
36
 }
37
 
38
 return i;
39
}

powered by: WebSVN 2.1.0

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