MCPcopy Create free account
hub / github.com/numpy/numpy / s_cmp

Function s_cmp

numpy/linalg/lapack_lite/f2c.c:444–467  ·  view source on GitHub ↗
(a0, b0, la, lb)

Source from the content-addressed store, hash-verified

442
443#ifdef KR_headers
444integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb;
445#else
446integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb)
447#endif
448{
449register unsigned char *a, *aend, *b, *bend;
450a = (unsigned char *)a0;
451b = (unsigned char *)b0;
452aend = a + la;
453bend = b + lb;
454
455if(la <= lb)
456 {
457 while(a < aend)
458 if(*a != *b)
459 return( *a - *b );
460 else
461 { ++a; ++b; }
462
463 while(b < bend)
464 if(*b != ' ')
465 return( ' ' - *b );
466 else ++b;
467 }
468
469else
470 {

Callers 1

ilaenv_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected