FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
livecode/lcidlc/encode_source.rev at develop · livecodeali/livecode · GitHub
livecodeali
/
livecode
Public
forked from
livecode/livecode
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
livecode
/
lcidlc
/
encode_source.rev
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (28 loc) · 788 Bytes
Breadcrumbs
livecode
/
lcidlc
/
encode_source.rev
Copy path
File metadata and controls
34 lines (28 loc) · 788 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /usr/bin/revolution -ui
# $1 = source file
# $2 = dst file
# $3 = var name
on startup
try
generate
catch tError
write tError & return to stderr
end try
end startup
on generate
local tSource
set the itemDelimiter to comma
local tInput, tOutput, tLength
put url ("file:" & $1) into tInput
put "const char *" & $3 & "[] =" & return after tOutput
put "{" & return after tOutput
repeat for each line tLine in tInput
replace "\" with "\\" in tLine
replace quote with "\" & quote in tLine
put tab & quote & tLine & "\n" & quote & comma & return after tOutput
end repeat
put tab & 0 & return after tOutput
put "}" & return after tOutput
put ";" & return after tOutput
put tOutput into url ("file:" & $2)
end generate
Back
|
FazBrowse Home
|
New Git URL