This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RespiraWorks Individual Contributor License Agreement | |
===================================================== | |
Thank you for your interest in contributing to RespiraWorks ("We" or "Us"). | |
This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission, following the instructions at https://respiraworks.github.io/Ventilator/contributing/contributing.html. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us. | |
1. Definitions | |
______________ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "strlncpy.h" | |
size_t strlncpy(char *dst, const char *src, size_t dbytes, size_t sbytes) | |
{ | |
char *d = dst; | |
const char *s = src; | |
size_t n = (dbytes > sbytes) ? sbytes : dbytes; | |
/* Copy as many bytes as will fit */ | |
while(n-- > 0) { |