elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
libc
/
string
/
strncmp.c
File editor
#include <string.h> #ifdef BCC_ASM mov bx,sp push si push di push es push ds pop es cld mov si,[bx+2] ! Fetch mov di,[bx+4] mov cx,[bx+6] inc cx lp1: dec cx je lp2 lodsb scasb jne lp3 testb al,al jne lp1 lp2: xor ax,ax jmp lp4 lp3: sbb ax,ax or al,#1 lp4: pop es pop di pop si ret #endif int strncmp(const char * d, const char * s, size_t l) { char c1 = 0, c2 = 0; while (l-- > 0) { if ((c1 = *d++) != (c2 = *s++) || c1 == '\0') break; } return c1 - c2; }
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history