* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
int i;
char pathbuf[PBUFSIZ]; /* holds raw path of filenames */
CGETENT_CONST char *pathvec[PVECSIZ]; /* point to names in pathbuf */
int i;
char pathbuf[PBUFSIZ]; /* holds raw path of filenames */
CGETENT_CONST char *pathvec[PVECSIZ]; /* point to names in pathbuf */
if (use_terminfo_vars() && (p = getenv("TERMCAP")) != 0
&& !_nc_is_abs_path(p) && _nc_name_match(p, tn, "|:")) {
/* TERMCAP holds a termcap entry */
if (use_terminfo_vars() && (p = getenv("TERMCAP")) != 0
&& !_nc_is_abs_path(p) && _nc_name_match(p, tn, "|:")) {
/* TERMCAP holds a termcap entry */
- strncpy(tc, p, sizeof(tc) - 1);
- tc[sizeof(tc) - 1] = '\0';
+ _nc_STRNCPY(tc, p, MY_SIZE);
+ tc[MY_SIZE] = '\0';