annotate src/dehqx.py @ 11103:3335c3c75611 v8.0.0439

patch 8.0.0439: ":%argdel" gives an error for an empty arglist commit https://github.com/vim/vim/commit/69a92fb5aecdf2f9d5f6947790b18991b22d0e4c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 9 15:58:30 2017 +0100 patch 8.0.0439: ":%argdel" gives an error for an empty arglist Problem: Using ":%argdel" while the argument list is already empty gives an error. (Pavol Juhas) Solution: Don't give an error. (closes #1546)
author Christian Brabandt <cb@256bit.org>
date Thu, 09 Mar 2017 16:00:05 +0100
parents f90bb88c2615
children 54756c29118c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 # Python script to get both the data and resource fork from a BinHex encoded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 # file.
3614
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 # Author: MURAOKA Taro <koron.kaoriya@gmail.com>
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 # Last Change: 2012 Jun 29
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 #
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
6 # Copyright (C) 2003,12 MURAOKA Taro <koron.kaoriya@gmail.com>
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
7 # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 import sys
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 import binhex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 input = sys.argv[1]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 conv = binhex.HexBin(input)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 info = conv.FInfo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 out = conv.FName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 out_data = out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 out_rsrc = out + '.rsrcfork'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 #print 'out_rsrc=' + out_rsrc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 print 'In file: ' + input
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 outfile = open(out_data, 'wb')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 print ' Out data fork: ' + out_data
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 while 1:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 d = conv.read(128000)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if not d: break
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 outfile.write(d)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 outfile.close()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 conv.close_data()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 d = conv.read_rsrc(128000)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 if d:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 print ' Out rsrc fork: ' + out_rsrc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 outfile = open(out_rsrc, 'wb')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 outfile.write(d)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 while 1:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 d = conv.read_rsrc(128000)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 if not d: break
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 outfile.write(d)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 outfile.close()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 conv.close()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 # vim:set ts=8 sts=4 sw=4 et: