mirror of
https://github.com/zrax/pycdc.git
synced 2026-06-23 11:34:07 +00:00
Merge uncommitted changes from old SVN copy
This commit is contained in:
parent
b45c30cc59
commit
7ffa2562c3
4 changed files with 109 additions and 25 deletions
10
string.cpp
10
string.cpp
|
|
@ -76,7 +76,10 @@ void OutputString(PycRef<PycString> str, char prefix, bool triple, FILE* F)
|
|||
len = str->length();
|
||||
|
||||
// Output the string
|
||||
fputc(useQuotes ? '"' : '\'', F);
|
||||
if (triple)
|
||||
fprintf(F, useQuotes ? "\"\"\"" : "'''");
|
||||
else
|
||||
fputc(useQuotes ? '"' : '\'', F);
|
||||
while (len--) {
|
||||
if (*ch < 0x20 || *ch == 0x7F) {
|
||||
if (*ch == '\r') {
|
||||
|
|
@ -108,5 +111,8 @@ void OutputString(PycRef<PycString> str, char prefix, bool triple, FILE* F)
|
|||
}
|
||||
ch++;
|
||||
}
|
||||
fputc(useQuotes ? '"' : '\'', F);
|
||||
if (triple)
|
||||
fprintf(F, useQuotes ? "\"\"\"" : "'''");
|
||||
else
|
||||
fputc(useQuotes ? '"' : '\'', F);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue