Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
823 B

{
printf "HKLM,";
if (substr($2, 1, 19) == "HKEY_LOCAL_MACHINE\\")
{
$2 = substr($2, 20);
}
printf $2;
if (NF == 2)
{
print "\\,,,";
continue;
}
else if ( substr($3,1,2) == "@=" )
{
$3 = substr($3,4,length($3)-3);
start = 3;
printf ",,";
}
else
{
if (index($3, "=") == 0)
{
print "ERROR";
}
else
{
printf ","substr($3, 2, index($3, "=")-3)",";
$3 = substr($3, index($3, "=")+2);
}
start = 3;
}
for (i = start; i <= NF; i++)
{
if (i == start)
{
printf ",\"";
}
if (substr($i, length($i), 1)=="\"")
{
printf substr($i, 1, length($i)-1);
}
else
{
printf $i;
}
if (i < NF)
{
printf " ";
}
else
{
printf "\"";
}
}
print "";
}