Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
1fc091cc
Commit
1fc091cc
authored
Nov 16, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sizes and line endings
parent
46175ff8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
asn1c/webcgi/asn1c.cgi
asn1c/webcgi/asn1c.cgi
+25
-4
No files found.
asn1c/webcgi/asn1c.cgi
View file @
1fc091cc
...
@@ -232,6 +232,20 @@ sub isoTime() {
...
@@ -232,6 +232,20 @@ sub isoTime() {
$cachedTime
=
"
$tm
[5]-
$tm
[4]-
$tm
[3]T
$tm
[2]:
$tm
[1]:
$tm
[0]
";
$cachedTime
=
"
$tm
[5]-
$tm
[4]-
$tm
[3]T
$tm
[2]:
$tm
[1]:
$tm
[0]
";
}
}
sub
humanFriendlySize
($)
{
my
$size
=
shift
;
if
(
$size
>
(
1024
*
1024
))
{
$size
>>=
20
;
$size
.=
"
Mb
";
}
elsif
(
$size
>
1024
)
{
$size
>>=
10
;
$size
.=
"
Kb
";
}
elsif
(
$size
>
0
)
{
$size
.=
"
bytes
";
}
return
$size
;
}
# Create the necessary environment for chrooting into.
# Create the necessary environment for chrooting into.
sub
prepareChrootEnvironment
()
{
sub
prepareChrootEnvironment
()
{
return
1
if
(
-
d
$TMPDIR
);
# Envuronment already exists
return
1
if
(
-
d
$TMPDIR
);
# Envuronment already exists
...
@@ -432,8 +446,9 @@ unless($session) {
...
@@ -432,8 +446,9 @@ unless($session) {
if
(
$targetFile
ne
'')
{
if
(
$targetFile
ne
'')
{
open
(
I
,
'
<
'
.
$targetFile
)
open
(
I
,
'
<
'
.
$targetFile
)
or
bark
("
Invalid or outdated request $!
");
or
bark
("
Invalid or outdated request $!
");
printf
"
Content-Type: text/plain
\n\n
";
printf
"
Content-Type: text/plain
\r\n\r\n
";
print
while
<
I
>
;
# Do not slurp 'cause of potentially huge size
while
(
<
I
>
)
{
s/\n/\r\n/g
;
print
;
}
exit
(
0
);
exit
(
0
);
}
}
}
}
...
@@ -859,6 +874,7 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
...
@@ -859,6 +874,7 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
my $resCode = "log";
my $resCode = "log";
my $resText = "Show compiler log";
my $resText = "Show compiler log";
my $decodedSize = 0;
if($ec eq "0") {
if($ec eq "0") {
$results = "<FONT COLOR=darkgreen><B>"
$results = "<FONT COLOR=darkgreen><B>"
...
@@ -872,6 +888,8 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
...
@@ -872,6 +888,8 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
$msg =
'
This
looks
like
'
. $type;
$msg =
'
This
looks
like
'
. $type;
}
}
$results = "<FONT COLOR=darkgreen><B>$msg</B></FONT><BR>
\
n";
$results = "<FONT COLOR=darkgreen><B>$msg</B></FONT><BR>
\
n";
$decodedSize = humanFriendlySize(
-s $sessionDir .
'
/' . $trans . '/
+
UNBER
'
);
if(-f $sessionDir .
'
/' . $trans . '/
+
UNBER
.
EXIT
'
) {
if(-f $sessionDir .
'
/' . $trans . '/
+
UNBER
.
EXIT
'
) {
$results = "<FONT COLOR=darkred SIZE=-1>"
$results = "<FONT COLOR=darkred SIZE=-1>"
. "<NOBR>$type:</NOBR> "
. "<NOBR>$type:</NOBR> "
...
@@ -891,8 +909,10 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
...
@@ -891,8 +909,10 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
. "$why</FONT><BR>
\
n";
. "$why</FONT><BR>
\
n";
}
}
$archiveSize = humanFriendlySize(
-s $sessionDir .
'
/' . $trans . '/
+
Archive
.
tgz
'
);
$allowFetchResults = $ec eq "0"
$allowFetchResults = $ec eq "0"
&& (
-f $sessionDir .
'
/' . $trans . '/
+
Archive
.
tgz
'
&& (
$archiveSize
|| -f $sessionDir .
'
/' . $trans . '/
Makefile
.
am
.
sample
'
);
|| -f $sessionDir .
'
/' . $trans . '/
Makefile
.
am
.
sample
'
);
$results .= "<NOBR>"
$results .= "<NOBR>"
...
@@ -902,6 +922,7 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
...
@@ -902,6 +922,7 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
. "&file=$f"
. "&file=$f"
. "&show=$resCode
\
">"
. "&show=$resCode
\
">"
. "$resText</A>"
. "$resText</A>"
. ($decodedSize ? " ($decodedSize)" :
''
)
. ($ec ?
'
&
larr
;'
:
''
)
. ($ec ?
'
&
larr
;'
:
''
)
. "</NOBR>";
. "</NOBR>";
$results .= "<BR>
\
n<NOBR>"
$results .= "<BR>
\
n<NOBR>"
...
@@ -909,7 +930,7 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
...
@@ -909,7 +930,7 @@ foreach my $trans (sort { $b cmp $a } @transactions) {
. escapeHTML($origTime)
. escapeHTML($origTime)
. "&file=$f"
. "&file=$f"
. "&show=tgz
\
">"
. "&show=tgz
\
">"
. "Fetch compiled C sources (.tgz)</A> ←</NOBR>"
. "Fetch compiled C sources (
$archiveSize
.tgz)</A> ←</NOBR>"
if $allowFetchResults;
if $allowFetchResults;
if($ec ne "0") {
if($ec ne "0") {
my ($eml, @resp);
my ($eml, @resp);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment