Remove unused concatn_doublenull / concatn_fitting_doublenull

This commit is contained in:
bnnm 2017-01-03 15:02:42 +01:00
parent 46108764d5
commit cc5657f9c9
2 changed files with 0 additions and 41 deletions

View File

@ -175,42 +175,3 @@ void concatn(int length, char * dst, const char * src) {
dst[i]=src[j];
dst[i]='\0';
}
/* length is maximum length of dst. dst will always be double-null-terminated if
* length > 1 */
void concatn_doublenull(int length, char * dst, const char * src) {
int i,j;
if (length <= 1) return;
for (i=0;i<length-2 && (dst[i] || dst[i+1]);i++); /* find end of dst */
if (i==length-2) {
dst[i]='\0';
dst[i+1]='\0';
return;
}
if (i>0) i++;
for (j=0;i<length-2 && (src[j] || src[j+1]);i++,j++) dst[i]=src[j];
dst[i]='\0';
dst[i+1]='\0';
}
/* length is maximum length of dst. dst will always be double-null-terminated if
* length > 1, if src won't fit, truncate */
void concatn_fitting_doublenull(int length, char * dst, const char * src) {
int i,j,k;
if (length <= 1) return;
for (i=0;i<length-2 && (dst[i] || dst[i+1]);i++); /* find end of dst */
if (i==length-2) {
dst[i]='\0';
dst[i+1]='\0';
return;
}
if (i>0) i++;
k = i;
for (j=0;i<length-2 && (src[j] || src[j+1]);i++,j++) dst[i]=src[j];
if (i == length-2 && (src[j] || src[j+1])) {
i = k;
}
dst[i]='\0';
dst[i+1]='\0';
}

View File

@ -69,8 +69,6 @@ void make_smpl_chunk(uint8_t * buf, int32_t loop_start, int32_t loop_end);
void swap_samples_le(sample *buf, int count);
void concatn(int length, char * dst, const char * src);
void concatn_doublenull(int length, char * dst, const char * src);
void concatn_fitting_doublenull(int length, char * dst, const char * src);
/* Simple stdout logging for debugging and regression testing purposes.