PageSourceSearch

https://asia-da.de/lib/proclib.js

js asia-da.de collected 2026-10-07 23:38:56 UTC 1,977 bytes, 87 lines download raw bytes

1// Füllzeichen erstellen
2function padl(n, width, z)
3{
4  z = z || '0';
5  n = n + '';
6  return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
7}
8
9// Merker-Funktionen
10function Merker_Set(msk,m0,m1,m2,m3,m4,m5,m6,m7,m8,m9)
11{
12	var erg = msk;
13	if(m0 != undefined) erg = erg | (1 << m0);
14	if(m1 != undefined) erg = erg | (1 << m1);
15	if(m2 != undefined) erg = erg | (1 << m2);
16	if(m3 != undefined) erg = erg | (1 << m3);
17	if(m4 != undefined) erg = erg | (1 << m4);
18	if(m5 != undefined) erg = erg | (1 << m5);
19	if(m6 != undefined) erg = erg | (1 << m6);
20	if(m7 != undefined) erg = erg | (1 << m7);
21	if(m8 != undefined) erg = erg | (1 << m8);
22	if(m9 != undefined) erg = erg | (1 << m9);
23	return erg;
24}
25
26function Merker_Tst(mrk,flg)
27{
28	var msk = Merker_Set(0,flg);
29	return (mrk & msk) == msk;
30}
31
32function Get_ArtIdent(num,pre)
33{
34	var lc_pref = (pre == undefined ? "CN" : pre),
35		lc_subn = "",
36		lc_numm = (typeof(num)=='number'?num.toString():num),
37		lc_data = undefined;
38	if(lc_numm.indexOf("x") >= 0)
39	{
40		lc_numm = lc_numm.substr(lc_numm.indexOf("x")+1);
41	}
42
43	if(lc_numm.indexOf('.') > 0)
44	{
45		lc_subn = lc_numm.substr(lc_numm.indexOf(".")+1);
46		lc_numm = lc_numm.substr(0,lc_numm.indexOf("."));
47	}
48
49	try
50	{
51		lc_data = eval(lc_pref+padl(lc_numm,4)+'_'+padl(lc_subn,2));
52	}
53	catch(e)
54	{
55		lc_data = undefined;
56	}
57	return lc_data;
58}
59
60// String-Funktionen
61function GetParamCount(txt)
62{
63	return GetWordCount(txt,',');
64}
65
66function GetParamNumm(num,txt)
67{
68	return GetWordNumm(num,txt,',');
69}
70
71function GetWordCount(txt,del)
72{
73	var Lc_list = txt.split((del == undefined ? " " : del));
74	return Lc_list.length;
75}
76function GetWordNumm(num,txt,del)
77{
78	var Lc_list = txt.split((del == undefined ? " " : del));
79	return Lc_list[num-1];
80}
81function GetRandParam(txt)
82{
83	if(txt == undefined) 
84		return false;
85	return GetParamNumm(parseInt(Math.random()*GetParamCount(txt))+1 | 0,txt);
86}
87

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.