diff options
-rw-r--r-- | libcrystfel/src/indexers/fromfile.c | 24 | ||||
-rwxr-xr-x | scripts/stream2sol.py | 5 |
2 files changed, 1 insertions, 28 deletions
diff --git a/libcrystfel/src/indexers/fromfile.c b/libcrystfel/src/indexers/fromfile.c index 7d95baae..1f3cc0da 100644 --- a/libcrystfel/src/indexers/fromfile.c +++ b/libcrystfel/src/indexers/fromfile.c @@ -185,28 +185,6 @@ static int set_lattice(UnitCell *cell, const char *ltsym) } -static void unescape(char *line) -{ - size_t len; - int i, w; - int esc = 0; - - len = strlen(line); - w = 0; - for ( i=0; i<len; i++ ) { - if ( esc ) { - line[w++] = line[i]; - esc = 0; - } else if ( line[i] == '\\' ) { - esc = 1; - } else { - line[w++] = line[i]; - } - } - line[w] = '\0'; -} - - void *fromfile_prepare(IndexingMethod *indm, struct fromfile_options *opts) { FILE *fh; @@ -288,8 +266,6 @@ void *fromfile_prepare(IndexingMethod *indm, struct fromfile_options *opts) } } - unescape(line); - if ( make_key(&key, line, bits[0]) ) { ERROR("Failed to make key for %s %s\n", line, bits[0]); diff --git a/scripts/stream2sol.py b/scripts/stream2sol.py index 76aa0068..7b194235 100755 --- a/scripts/stream2sol.py +++ b/scripts/stream2sol.py @@ -81,9 +81,6 @@ class Crystal: cs += ' ' + self.lattice_type_sym return cs -def escape_spaces(str): - return str.replace('\\', '\\\\').replace(' ', '\\ ') - class Chunk: def __init__(self, line): @@ -116,7 +113,7 @@ class Chunk: # return '\n'.join([' '.join([self.file, *self.Event.split('//'), str(cryst)]) # for ii, cryst in enumerate(self.crystals)]) # new-style (not working yet) - return '\n'.join([' '.join([escape_spaces(self.file), self.Event, str(cryst)]) + return '\n'.join([' '.join([self.file, self.Event, str(cryst)]) for ii, cryst in enumerate(self.crystals)]) |