
gehe zum Quellcode dieser Datei
Funktionen | |
| varargs public void | More (string txt, int file, mixed ctrl, mixed ctrlargs, int flags) |
| varargs public void More | ( | string | txt, | |
| int | file, | |||
| mixed | ctrl, | |||
| mixed | ctrlargs, | |||
| int | flags | |||
| ) |
Definiert in Zeile 84 der Datei pager.c.
Benutzt break_string(), call(), CURL, E_CAT, eval_command(), FILE, FLAG, IS_LEARNER, JUNK, MAX_LINE_READ, MAXL, P_MORE_FLAGS, PAGE, PAGELENGTH und TEXT.
00087 { 00088 int j; 00089 mixed tmp, pinfo; 00090 if(!txt) return call(ctrl, ctrlargs); 00091 // TEXT, FILE, CURL, MAXL, REGX, PAGE, CTRL, CARG 00092 pinfo = ({ txt, file, 1, 1, 20, 0, ctrl, ctrlargs, flags }); 00093 00094 if (pinfo[FILE]) 00095 { 00096 if (file_size(pinfo[TEXT])<50000) 00097 { 00098 pinfo[TEXT]=read_file(pinfo[TEXT]); 00099 if (!pinfo[TEXT]) 00100 { 00101 call(ctrl, ctrlargs); 00102 return; 00103 } 00104 pinfo[FILE]=0; 00105 } 00106 else if (file_size(pinfo[TEXT])>1048576) 00107 { 00108 tell_object(this_player()||this_object(),break_string(sprintf( 00109 "Die Datei '%s' kann nicht angezeigt werden, da " 00110 "sie groesser als 1 MB ist. %s",pinfo[TEXT], 00111 IS_LEARNER(this_player()||this_object())?"":"Bitte verstaendige " 00112 "diesbezueglich umgehend einen Magier."),78)); 00113 call(ctrl,ctrlargs); 00114 return; 00115 } 00116 } 00117 00118 if(!pinfo[FILE] && pinfo[TEXT][<1..<1] != "\n") pinfo[TEXT] += "\n"; 00119 pinfo += ({ ([1:0]) }); 00120 if(!pinfo[FILE]) 00121 while((j = strstr(pinfo[TEXT], "\n", j+1)) != -1) 00122 pinfo[JUNK][++pinfo[MAXL]] = j+1; 00123 else 00124 while(tmp = read_file(pinfo[TEXT], pinfo[MAXL], MAX_LINE_READ)) 00125 pinfo[MAXL] += sizeof(explode(tmp, "\n"))+1; 00126 pinfo[PAGE] = PAGELENGTH; 00127 if(!pinfo[PAGE]) pinfo[FLAG] |= E_CAT; 00128 if ((this_interactive() && (j=(int)this_interactive()->QueryProp(P_MORE_FLAGS))) || 00129 (this_player() && interactive(this_player()) && 00130 (j=(int)this_player()->QueryProp(P_MORE_FLAGS)))) 00131 pinfo[FLAG] |= j; 00132 00133 pinfo[CURL] = 1; 00134 eval_command(-1, pinfo); 00135 return; 00136 }

1.6.3