Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
4958d41d
Commit
4958d41d
authored
Oct 30, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change from $$ to \n$$ for .6 meta section delimiter
R=r DELTA=13 (5 added, 0 deleted, 8 changed) OCL=18190 CL=18192
parent
2e90e542
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
go.c
src/cmd/6l/go.c
+11
-6
ar.c
src/cmd/ar/ar.c
+1
-1
export.c
src/cmd/gc/export.c
+1
-1
No files found.
src/cmd/6l/go.c
View file @
4958d41d
...
...
@@ -91,14 +91,16 @@ ldpkg(Biobuf *f, int64 len, char *filename)
return
;
}
// first
$$ marks beginning of exports
p0
=
strstr
(
data
,
"$$"
);
// first
\n$$ marks beginning of exports - skip rest of line
p0
=
strstr
(
data
,
"
\n
$$"
);
if
(
p0
==
nil
)
return
;
p0
+=
2
;
p0
+=
3
;
while
(
*
p0
!=
'\n'
&&
*
p0
!=
'\0'
)
p0
++
;
p1
=
strstr
(
p0
,
"$$"
);
// second marks end of exports / beginning of local data
p1
=
strstr
(
p0
,
"
\n
$$"
);
if
(
p1
==
nil
)
{
fprint
(
2
,
"6l: cannot find end of exports in %s
\n
"
,
filename
);
return
;
...
...
@@ -118,10 +120,13 @@ ldpkg(Biobuf *f, int64 len, char *filename)
loadpkgdata
(
filename
,
p0
,
p1
-
p0
);
// local types begin where exports end.
p0
=
p1
;
// skip rest of line after $$ we found above
p0
=
p1
+
3
;
while
(
*
p0
!=
'\n'
&&
*
p0
!=
'\0'
)
p0
++
;
p1
=
strstr
(
p0
,
"$$"
);
// local types end at next \n$$.
p1
=
strstr
(
p0
,
"
\n
$$"
);
if
(
p1
==
nil
)
{
fprint
(
2
,
"6l: cannot find end of local types in %s
\n
"
,
filename
);
return
;
...
...
src/cmd/ar/ar.c
View file @
4958d41d
...
...
@@ -701,7 +701,7 @@ foundstart:
first
=
0
;
continue
;
}
if
(
strstrn
(
line
,
Blinelen
(
b
),
"$$"
)
)
if
(
line
[
0
]
==
'$'
&&
line
[
1
]
==
'$'
)
goto
foundend
;
end
=
Boffset
(
b
);
// before closing $$
}
...
...
src/cmd/gc/export.c
View file @
4958d41d
...
...
@@ -195,7 +195,7 @@ dumpexport(void)
lno
=
lineno
;
Bprint
(
bout
,
" import
\n
"
);
Bprint
(
bout
,
"
$$ // exports
\n
"
);
Bprint
(
bout
,
"
\n
$$ // exports
\n
"
);
Bprint
(
bout
,
" package %s
\n
"
,
package
);
...
...
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