--- fileio.c 2003-09-08 16:25:28.000000000 +0200 +++ /home/nion/tar_deb/screen-4.0.2/fileio.c 2005-05-12 16:50:21.000000000 +0200 @@ -2,6 +2,8 @@ * Juergen Weigert (address@hidden) * Michael Schroeder (address@hidden) * Copyright (c) 1987 Oliver Laumann + * A part for the configuration file loading was written by + * Nico Golde * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -291,13 +293,23 @@ do_source(rcfilename) char *rcfilename; { + char *tmp_file, *tmp_rcname; if (rc_recursion > 10) { Msg(0, "%s: source: recursion limit reached", rc_name); return; } rc_recursion++; - FinishRc(rcfilename); + if (rcfilename[0]=='~' && rcfilename[1]=='/') + { + tmp_file=getenv("HOME"); + strncat(tmp_file,"/",1); + tmp_rcname=strtok(rcfilename,"~/"); + strncat(tmp_file,tmp_rcname, strlen(tmp_rcname)); + FinishRc(tmp_file); + } + else + FinishRc(rcfilename); rc_recursion--; }