ObjFW  Check-in [e851d0f1dd]

Overview
Comment:OFZIP: Fix help not being shown.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e851d0f1ddbf092d94f069778a29ae38a10197d00e16fb083b33b59c33d1d4f0
User & Date: js on 2013-11-18 15:14:55
Other Links: manifest | tags
Context
2013-11-18
15:23
OFZIP: Write files in binary mode. check-in: f6889355ee user: js tags: trunk
15:14
OFZIP: Fix help not being shown. check-in: e851d0f1dd user: js tags: trunk
14:49
OFZIP: Add list mode. check-in: 65730f62c5 user: js tags: trunk
Changes

Modified utils/OFZIP.m from [37633a42a1] to [f85ab98d59].

99
100
101
102
103
104
105


106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122








123
124
125
126
127
128
129
						[optionsParser lastOption]];
			[OFApplication terminateWithStatus: 1];
		}
	}

	remainingArguments = [optionsParser remainingArguments];



	if ([remainingArguments count] < 1)
		help(of_stderr, false, 1);

	files = [remainingArguments objectsInRange:
	    of_range(1, [remainingArguments count] - 1)];
	archive = [OFZIPArchive archiveWithPath:
	    [remainingArguments firstObject]];

	switch (mode) {
	case 'l':
		if ([files count] > 0)
			help(of_stderr, false, 1);

		[self listFilesInArchive: archive
				 verbose: verbose];
		break;
	case 'x':








		[self extractFiles: files
		       fromArchive: archive
			  override: override];
		break;
	default:
		help(of_stderr, true, 1);
		break;







>
>
|
|

<
<
|
|
<
<
<
<
<





>
>
>
>
>
>
>
>







99
100
101
102
103
104
105
106
107
108
109
110


111
112





113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
						[optionsParser lastOption]];
			[OFApplication terminateWithStatus: 1];
		}
	}

	remainingArguments = [optionsParser remainingArguments];

	switch (mode) {
	case 'l':
		if ([remainingArguments count] != 1)
			help(of_stderr, false, 1);



		archive = [OFZIPArchive archiveWithPath:
		    [remainingArguments firstObject]];






		[self listFilesInArchive: archive
				 verbose: verbose];
		break;
	case 'x':
		if ([remainingArguments count] < 1)
			help(of_stderr, false, 1);

		files = [remainingArguments objectsInRange:
		    of_range(1, [remainingArguments count] - 1)];
		archive = [OFZIPArchive archiveWithPath:
		    [remainingArguments firstObject]];

		[self extractFiles: files
		       fromArchive: archive
			  override: override];
		break;
	default:
		help(of_stderr, true, 1);
		break;