Description: /usr/local/share/games/fortunes should be searched even if locale is not set. . The source is rather grotty. I'd really recommend stripping out register, auto, and the definitions for true, false, TRUE, and FALSE. . Patch follows: . It just moves some cases from only checking when locale environment variables are set, to always doing them. Author: Aaron Denney Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=284043 Index: b/fortune/fortune.c =================================================================== --- a/fortune/fortune.c 2012-07-07 07:00:54.000000000 +0200 +++ b/fortune/fortune.c 2012-07-07 07:00:54.000000000 +0200 @@ -869,6 +869,7 @@ for (i = 0; i < file_cnt; i++) { + int ret=0; percent = NO_PROB; if (!isdigit(files[i][0])) sp = files[i]; @@ -940,7 +941,6 @@ if (!lang) lang=getenv("LANG"); if (lang) { char llang[512]; - int ret=0; char *p; strncpy(llang,lang,sizeof(llang)); @@ -971,27 +971,23 @@ lang=p; } - /* default */ - if (!ret) - ret=add_file(percent, fullpathname, NULL, &File_list, + } + + /* default */ + if (!ret) + ret=add_file(percent, fullpathname, NULL, &File_list, &File_tail, NULL); - if ( (!ret && fullpathname != locpathname) || strcmp(sp, "all") == 0 ) - ret=add_file(percent, locpathname, NULL, &File_list, + if ( (!ret && fullpathname != locpathname) || strcmp(sp, "all") == 0 ) + ret=add_file(percent, locpathname, NULL, &File_list, &File_tail, NULL); - if (!ret){ - snprintf (locpathname, sizeof (locpathname), "%s/%s", getenv ("PWD"), sp); - - ret=add_file (percent, locpathname, NULL, &File_list, &File_tail, NULL); - } - if (!ret) - return FALSE; - - } - else - if (!add_file(percent, fullpathname, NULL, &File_list, - &File_tail, NULL)) - return FALSE; + if (!ret) { + snprintf (locpathname, sizeof (locpathname), "%s/%s", getenv ("PWD"), sp); + ret=add_file (percent, locpathname, NULL, &File_list, &File_tail, NULL); + } + + if (!ret) + return FALSE; } return TRUE; }