168{
169 static const WCHAR SL_LINKOPEN[] = {
'<',
'a' };
170 static const WCHAR SL_HREF[] = {
'h',
'r',
'e',
'f',
'=',
'\"' };
171 static const WCHAR SL_ID[] = {
'i',
'd',
'=',
'\"' };
172 static const WCHAR SL_LINKCLOSE[] = {
'<',
'/',
'a',
'>' };
174 int taglen = 0, textlen = 0, linklen = 0, docitems = 0;
179
181
183 {
185 {
187 {
189
191 {
192
193 taglen = 3;
197 linklen = 0;
200 }
202 {
203
206
207 taglen = 3;
211
212CheckParameter:
213
215 {
216 taglen += 6;
218 CurrentParameter = &lpUrl;
219 CurrentParameterLen = &lenUrl;
220 }
222 {
223 taglen += 4;
225 CurrentParameter = &lpID;
226 CurrentParameterLen = &lenId;
227 }
228 else
229 {
231 }
232
233 if(ValidParam)
234 {
235
236
238 *CurrentParameter =
current + taglen;
239 *CurrentParameterLen = 0;
240
241 for(tmp = *CurrentParameter; *tmp != 0; tmp++)
242 {
243 taglen++;
244 if(*tmp == '\"')
245 {
247 tmp++;
248 break;
249 }
250 (*CurrentParameterLen)++;
251 }
252 }
253 if(ValidParam)
254 {
255
256
257
258
260 {
261
262 taglen++;
263 tmp++;
264 goto CheckParameter;
265 }
266 else if(*tmp == '>')
267 {
268
270 taglen++;
271 }
272 }
273 }
274
275 if(ValidLink && ValidParam)
276 {
277
278
281 linklen = 0;
283 }
284 else
285 {
286 taglen = 1;
289 if(textstart ==
NULL)
290 {
292 }
293 }
294 }
296 {
297
298 if(textstart !=
NULL && textlen > 0 && firsttag > textstart)
299 {
302 {
303 ERR(
"Unable to create new document item!\n");
304 return docitems;
305 }
306 docitems++;
308 textlen = 0;
309 }
310
311
313 if(linktext !=
NULL && linklen > 0)
314 {
317 {
318 ERR(
"Unable to create new document item!\n");
319 return docitems;
320 }
321 docitems++;
323 {
324 int nc;
325
327 {
329 }
330
332 {
337 {
339 }
340 }
341 else
344 {
349 {
351 }
352 }
353 else
355 }
357 }
361 continue;
362 }
363 else
364 {
365
366 taglen = 1;
367 linklen++;
368 if(CurrentType ==
slText && textstart ==
NULL)
369 {
371 }
372 }
373
374 textlen += taglen;
376 }
377 else
378 {
379 textlen++;
380 linklen++;
381
382
383 if(textstart ==
NULL && CurrentType ==
slText)
384 {
386 }
387
389 }
390 }
391
392 if(textstart !=
NULL && textlen > 0)
393 {
396 {
397 ERR(
"Unable to create new document item!\n");
398 return docitems;
399 }
401 {
402 int nc;
403
405 {
407 }
408
410 {
415 {
417 }
418 }
419 else
422 {
427 {
429 }
430 }
431 else
433 }
434 docitems++;
435 }
436
437 if(linktext !=
NULL && linklen > 0)
438 {
439
442 {
443 ERR(
"Unable to create new document item!\n");
444 return docitems;
445 }
446 docitems++;
447 }
448
449 return docitems;
450}
static PDOC_ITEM SYSLINK_AppendDocItem(SYSLINK_INFO *infoPtr, LPCWSTR Text, UINT textlen, SL_ITEM_TYPE type, PDOC_ITEM LastItem)
struct task_struct * current
#define strncmpiW(s1, s2, n)