implementations of strncmp, strncat, strncpy
I think you've misinterpreted the definition of strncat, which says,


  Appends the first num characters of source to destination, plus a terminating null-character.
  If the length of the C string in source is less than num, only the content up to the terminating null-character is copied.


n is the maximum number of characters in source you you want to copy, and bfsize doesn't exist in the standard version of strncat.

char destination[256];
strpy(destination, "foo");
strncat(destination, "bar", 2);
// expect destination should now contain "fooba" !


It's good of you to write a custom version with an extra parameter to make it safe, but that's not what the question asked for.

See also Manual Reference Pages  - Strn (3) (e.g. Strncat instead of strncat); or, the Microsoft versions of the 'safe' functions have _l as a suffix.

I'm not sure that returning null and doing no copy is the standard way to avoid buffer overflow.



In your custom_strncmp method, I'm not sure what correct behaviour should be if you call

strncmp("foo", "foo", 10);


Your function might return 0 or non-zero, or crash, depending on what's after the end of the string.

You could perhaps write it more elegantly as a for loop:

for ( ; n--; ++s, ++t) {
    if(*s != *t) {
        return *s - *t;
    }
}




In custom_strncat you don't handle the condition where n &gt; strlen(t).



Your parameters could (should) be better named, e.g. source and destination. Parameter names are important (even more important than good names for local variables) because they may be the only documentation about how the function should be called.