ObjFW  Check-in [1590be4bbc]

Overview
Comment:Fix some code that was not converted to new APIs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1590be4bbc80b65ad59a383bac37527c6303f0bd04952a9c1a46b075aa24caaa
User & Date: js on 2012-02-05 14:16:32
Other Links: manifest | tags
Context
2012-02-05
14:29
It seems signing is not required anymore on iOS. check-in: 5d732af342 user: js tags: trunk
14:16
Fix some code that was not converted to new APIs. check-in: 1590be4bbc user: js tags: trunk
2012-02-03
15:06
Make the parser optional for OFMalformedXMLException. check-in: 20e7d0c0e2 user: js tags: trunk
Changes

Modified src/OFApplication.m from [193eba5279] to [8f063b7bf5].

145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
		 * iOS does not provide environ and Apple does not allow using
		 * _NSGetEnviron on iOS. Therefore, we just get a few common
		 * variables from the environment which applications might
		 * expect.
		 */
		if ((env = getenv("HOME")) != NULL)
			[environment
			    setObject: [OFString stringWithCString: env]
			       forKey: @"HOME"];
		if ((env = getenv("PATH")) != NULL)
			[environment
			    setObject: [OFString stringWithCString: env]
			       forKey: @"PATH"];
		if ((env = getenv("SHELL")) != NULL)
			[environment
			    setObject: [OFString stringWithCString: env]
			       forKey: @"SHELL"];
		if ((env = getenv("TMPDIR")) != NULL)
			[environment
			    setObject: [OFString stringWithCString: env]
			       forKey: @"TMPDIR"];
		if ((env = getenv("USER")) != NULL)
			[environment
			    setObject: [OFString stringWithCString: env]
			       forKey: @"USER"];
#endif
		[pool release];

		[environment makeImmutable];
	} @catch (id e) {
		[self release];







|



|



|



|



|







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
		 * iOS does not provide environ and Apple does not allow using
		 * _NSGetEnviron on iOS. Therefore, we just get a few common
		 * variables from the environment which applications might
		 * expect.
		 */
		if ((env = getenv("HOME")) != NULL)
			[environment
			    setObject: [OFString stringWithUTF8String: env]
			       forKey: @"HOME"];
		if ((env = getenv("PATH")) != NULL)
			[environment
			    setObject: [OFString stringWithUTF8String: env]
			       forKey: @"PATH"];
		if ((env = getenv("SHELL")) != NULL)
			[environment
			    setObject: [OFString stringWithUTF8String: env]
			       forKey: @"SHELL"];
		if ((env = getenv("TMPDIR")) != NULL)
			[environment
			    setObject: [OFString stringWithUTF8String: env]
			       forKey: @"TMPDIR"];
		if ((env = getenv("USER")) != NULL)
			[environment
			    setObject: [OFString stringWithUTF8String: env]
			       forKey: @"USER"];
#endif
		[pool release];

		[environment makeImmutable];
	} @catch (id e) {
		[self release];