comparison src/video/fbcon/SDL_fbevents.c @ 1776:ed39aa7383ea

SDL_strncpy doesn't exist
author Sam Lantinga <slouken@libsdl.org>
date Mon, 08 May 2006 03:49:51 +0000
parents 5115185b6e3c
children e28233f37f8c
comparison
equal deleted inserted replaced
1775:5572e4204f36 1776:ed39aa7383ea
398 /* protocol string, keep it for later */ 398 /* protocol string, keep it for later */
399 char *t, *s; 399 char *t, *s;
400 t = arg + arglen; 400 t = arg + arglen;
401 s = SDL_strchr(t, ' '); 401 s = SDL_strchr(t, ' ');
402 if (s) *s = 0; 402 if (s) *s = 0;
403 SDL_strncpy(raw_proto, t, SDL_arraysize(raw_proto)); 403 SDL_strlcpy(raw_proto, t, SDL_arraysize(raw_proto));
404 if (s) *s = ' '; 404 if (s) *s = ' ';
405 } 405 }
406 if ( SDL_strncmp(arg, "-R", 2) == 0 ) { 406 if ( SDL_strncmp(arg, "-R", 2) == 0 ) {
407 char *t, *s; 407 char *t, *s;
408 available = 1; 408 available = 1;
409 t = arg + 2; 409 t = arg + 2;
410 s = SDL_strchr(t, ' '); 410 s = SDL_strchr(t, ' ');
411 if (s) *s = 0; 411 if (s) *s = 0;
412 SDL_strncpy(repeat_proto, t, SDL_arraysize(repeat_proto)); 412 SDL_strlcpy(repeat_proto, t, SDL_arraysize(repeat_proto));
413 if (s) *s = ' '; 413 if (s) *s = ' ';
414 } 414 }
415 len -= arglen; 415 len -= arglen;
416 arg += arglen; 416 arg += arglen;
417 } 417 }