167{
168 static const WCHAR SL_LINKOPEN[] = {
'<',
'a' };
169 static const WCHAR SL_HREF[] = {
'h',
'r',
'e',
'f',
'=',
'\"' };
170 static const WCHAR SL_ID[] = {
'i',
'd',
'=',
'\"' };
171 static const WCHAR SL_LINKCLOSE[] = {
'<',
'/',
'a',
'>' };
173 int taglen = 0, textlen = 0, linklen = 0, docitems = 0;
178
180
182 {
184 {
186 {
188
190 {
191
192 taglen = 3;
196 linklen = 0;
199 }
201 {
202
205
206 taglen = 3;
210
211CheckParameter:
212
214 {
215 taglen += 6;
217 CurrentParameter = &lpUrl;
218 CurrentParameterLen = &lenUrl;
219 }
221 {
222 taglen += 4;
224 CurrentParameter = &lpID;
225 CurrentParameterLen = &lenId;
226 }
227 else
228 {
230 }
231
232 if(ValidParam)
233 {
234
235
237 *CurrentParameter =
current + taglen;
238 *CurrentParameterLen = 0;
239
240 for(tmp = *CurrentParameter; *tmp != 0; tmp++)
241 {
242 taglen++;
243 if(*tmp == '\"')
244 {
246 tmp++;
247 break;
248 }
249 (*CurrentParameterLen)++;
250 }
251 }
252 if(ValidParam)
253 {
254
255
256
257
259 {
260
261 taglen++;
262 tmp++;
263 goto CheckParameter;
264 }
265 else if(*tmp == '>')
266 {
267
269 taglen++;
270 }
271 }
272 }
273
274 if(ValidLink && ValidParam)
275 {
276
277
280 linklen = 0;
282 }
283 else
284 {
285 taglen = 1;
288 if(textstart ==
NULL)
289 {
291 }
292 }
293 }
295 {
296
297 if(textstart !=
NULL && textlen > 0 && firsttag > textstart)
298 {
301 {
302 ERR(
"Unable to create new document item!\n");
303 return docitems;
304 }
305 docitems++;
307 textlen = 0;
308 }
309
310
312 if(linktext !=
NULL && linklen > 0)
313 {
316 {
317 ERR(
"Unable to create new document item!\n");
318 return docitems;
319 }
320 docitems++;
322 {
323 int nc;
324
326 {
328 }
329
331 {
336 {
338 }
339 }
340 else
343 {
348 {
350 }
351 }
352 else
354 }
356 }
360 continue;
361 }
362 else
363 {
364
365 taglen = 1;
366 linklen++;
367 if(CurrentType ==
slText && textstart ==
NULL)
368 {
370 }
371 }
372
373 textlen += taglen;
375 }
376 else
377 {
378 textlen++;
379 linklen++;
380
381
382 if(textstart ==
NULL && CurrentType ==
slText)
383 {
385 }
386
388 }
389 }
390
391 if(textstart !=
NULL && textlen > 0)
392 {
395 {
396 ERR(
"Unable to create new document item!\n");
397 return docitems;
398 }
400 {
401 int nc;
402
404 {
406 }
407
409 {
414 {
416 }
417 }
418 else
421 {
426 {
428 }
429 }
430 else
432 }
433 docitems++;
434 }
435
436 if(linktext !=
NULL && linklen > 0)
437 {
438
441 {
442 ERR(
"Unable to create new document item!\n");
443 return docitems;
444 }
445 docitems++;
446 }
447
448 return docitems;
449}
static PDOC_ITEM SYSLINK_AppendDocItem(SYSLINK_INFO *infoPtr, LPCWSTR Text, UINT textlen, SL_ITEM_TYPE type, PDOC_ITEM LastItem)
struct task_struct * current