Skip to content
Snippets Groups Projects
Commit 1a88ebf7 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

low_findprog checks for real files

Rev: lib/master.pike:1.62
Rev: lib/modules/Calendar.pmod/Swedish.pmod:1.2
parent a1ad683e
No related branches found
No related tags found
No related merge requests found
/* $Id: master.pike,v 1.61 1998/01/17 01:05:20 hubbe Exp $
/* $Id: master.pike,v 1.62 1998/01/17 17:32:55 mirar Exp $
*
* Master-file for Pike.
*/
......@@ -183,9 +183,11 @@ mapping (string:program) programs=(["/master":object_program(this_object())]);
static program low_findprog(string pname, string ext)
{
program ret;
array s;
string fname=pname+ext;
if(ret=programs[fname]) return ret;
if(master_file_stat(fname))
if( (s=master_file_stat(fname))
&& s[1]>=0 )
{
switch(ext)
{
......
......@@ -20,3 +20,15 @@ class Week
return "v"+(string)this->number();
}
}
class Year
{
inherit Calendar.Gregorian.Year;
string name()
{
if (this->number()<=0)
return (string)(1-this->number())+" fk";
return (string)this->number();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment