* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2009-07-14 13:57:45 +00:00
parent c2900a1bac
commit 3d4701a6e4
83 changed files with 271 additions and 271 deletions

View file

@ -603,7 +603,7 @@ void default_state(struct sudoku_state_t* state)
{
int r,c;
rb->strncpy(state->filename,GAME_FILE,MAX_PATH);
rb->strlcpy(state->filename,GAME_FILE,MAX_PATH);
for (r=0;r<9;r++) {
for (c=0;c<9;c++) {
state->startboard[r][c]=default_game[r][c];
@ -626,7 +626,7 @@ void clear_state(struct sudoku_state_t* state)
{
int r,c;
rb->strncpy(state->filename,GAME_FILE,MAX_PATH);
rb->strlcpy(state->filename,GAME_FILE,MAX_PATH);
for (r=0;r<9;r++) {
for (c=0;c<9;c++) {
state->startboard[r][c]='0';
@ -719,7 +719,7 @@ bool load_sudoku(struct sudoku_state_t* state, char* filename)
return(false);
}
rb->strncpy(state->filename,filename,MAX_PATH);
rb->strlcpy(state->filename,filename,MAX_PATH);
n=rb->read(fd,buf,300);
if (n <= 0) {
return(false);
@ -1111,7 +1111,7 @@ bool sudoku_generate(struct sudoku_state_t* state)
rb->snprintf(str,sizeof(str),"Difficulty: %s",difficulty);
display_board(state);
rb->splash(HZ*3, str);
rb->strncpy(state->filename,GAME_FILE,MAX_PATH);
rb->strlcpy(state->filename,GAME_FILE,MAX_PATH);
} else {
display_board(&new_state);
rb->splash(HZ*2, "Aborted");