Lines Matching refs:stream
173 write_csharp_string (FILE *stream, const char *str) in write_csharp_string() argument
178 fprintf (stream, "\""); in write_csharp_string()
184 fprintf (stream, "\\0"); in write_csharp_string()
186 fprintf (stream, "\\a"); in write_csharp_string()
188 fprintf (stream, "\\b"); in write_csharp_string()
190 fprintf (stream, "\\t"); in write_csharp_string()
192 fprintf (stream, "\\n"); in write_csharp_string()
194 fprintf (stream, "\\v"); in write_csharp_string()
196 fprintf (stream, "\\f"); in write_csharp_string()
198 fprintf (stream, "\\r"); in write_csharp_string()
200 fprintf (stream, "\\\""); in write_csharp_string()
202 fprintf (stream, "\\\\"); in write_csharp_string()
204 fprintf (stream, "%c", (int) uc); in write_csharp_string()
206 fprintf (stream, "\\u%c%c%c%c", in write_csharp_string()
210 fprintf (stream, "\\U%c%c%c%c%c%c%c%c", in write_csharp_string()
216 fprintf (stream, "\""); in write_csharp_string()
223 write_csharp_msgid (FILE *stream, message_ty *mp) in write_csharp_msgid() argument
229 write_csharp_string (stream, msgid); in write_csharp_msgid()
242 write_csharp_string (stream, combined); in write_csharp_msgid()
253 write_csharp_msgstr (FILE *stream, message_ty *mp) in write_csharp_msgstr() argument
260 fprintf (stream, "new System.String[] { "); in write_csharp_msgstr()
266 fprintf (stream, ", "); in write_csharp_msgstr()
267 write_csharp_string (stream, p); in write_csharp_msgstr()
269 fprintf (stream, " }"); in write_csharp_msgstr()
276 write_csharp_string (stream, mp->msgstr); in write_csharp_msgstr()
319 write_csharp_expression (FILE *stream, const struct expression *exp, bool as_boolean) in write_csharp_expression() argument
329 fprintf (stream, "%s", exp->val.num ? "true" : "false"); in write_csharp_expression()
332 fprintf (stream, "(!"); in write_csharp_expression()
333 write_csharp_expression (stream, exp->val.args[0], true); in write_csharp_expression()
334 fprintf (stream, ")"); in write_csharp_expression()
337 fprintf (stream, "("); in write_csharp_expression()
338 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
339 fprintf (stream, " < "); in write_csharp_expression()
340 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
341 fprintf (stream, ")"); in write_csharp_expression()
344 fprintf (stream, "("); in write_csharp_expression()
345 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
346 fprintf (stream, " > "); in write_csharp_expression()
347 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
348 fprintf (stream, ")"); in write_csharp_expression()
351 fprintf (stream, "("); in write_csharp_expression()
352 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
353 fprintf (stream, " <= "); in write_csharp_expression()
354 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
355 fprintf (stream, ")"); in write_csharp_expression()
358 fprintf (stream, "("); in write_csharp_expression()
359 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
360 fprintf (stream, " >= "); in write_csharp_expression()
361 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
362 fprintf (stream, ")"); in write_csharp_expression()
365 fprintf (stream, "("); in write_csharp_expression()
366 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
367 fprintf (stream, " == "); in write_csharp_expression()
368 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
369 fprintf (stream, ")"); in write_csharp_expression()
372 fprintf (stream, "("); in write_csharp_expression()
373 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
374 fprintf (stream, " != "); in write_csharp_expression()
375 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
376 fprintf (stream, ")"); in write_csharp_expression()
379 fprintf (stream, "("); in write_csharp_expression()
380 write_csharp_expression (stream, exp->val.args[0], true); in write_csharp_expression()
381 fprintf (stream, " && "); in write_csharp_expression()
382 write_csharp_expression (stream, exp->val.args[1], true); in write_csharp_expression()
383 fprintf (stream, ")"); in write_csharp_expression()
386 fprintf (stream, "("); in write_csharp_expression()
387 write_csharp_expression (stream, exp->val.args[0], true); in write_csharp_expression()
388 fprintf (stream, " || "); in write_csharp_expression()
389 write_csharp_expression (stream, exp->val.args[1], true); in write_csharp_expression()
390 fprintf (stream, ")"); in write_csharp_expression()
396 fprintf (stream, "("); in write_csharp_expression()
397 write_csharp_expression (stream, exp->val.args[0], true); in write_csharp_expression()
398 fprintf (stream, " ? "); in write_csharp_expression()
399 write_csharp_expression (stream, exp->val.args[1], true); in write_csharp_expression()
400 fprintf (stream, " : "); in write_csharp_expression()
401 write_csharp_expression (stream, exp->val.args[2], true); in write_csharp_expression()
402 fprintf (stream, ")"); in write_csharp_expression()
412 fprintf (stream, "("); in write_csharp_expression()
413 write_csharp_expression (stream, exp, false); in write_csharp_expression()
414 fprintf (stream, " != 0)"); in write_csharp_expression()
426 fprintf (stream, "n"); in write_csharp_expression()
429 fprintf (stream, "%lu", exp->val.num); in write_csharp_expression()
432 fprintf (stream, "("); in write_csharp_expression()
433 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
434 fprintf (stream, " * "); in write_csharp_expression()
435 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
436 fprintf (stream, ")"); in write_csharp_expression()
439 fprintf (stream, "("); in write_csharp_expression()
440 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
441 fprintf (stream, " / "); in write_csharp_expression()
442 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
443 fprintf (stream, ")"); in write_csharp_expression()
446 fprintf (stream, "("); in write_csharp_expression()
447 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
448 fprintf (stream, " %% "); in write_csharp_expression()
449 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
450 fprintf (stream, ")"); in write_csharp_expression()
453 fprintf (stream, "("); in write_csharp_expression()
454 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
455 fprintf (stream, " + "); in write_csharp_expression()
456 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
457 fprintf (stream, ")"); in write_csharp_expression()
460 fprintf (stream, "("); in write_csharp_expression()
461 write_csharp_expression (stream, exp->val.args[0], false); in write_csharp_expression()
462 fprintf (stream, " - "); in write_csharp_expression()
463 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
464 fprintf (stream, ")"); in write_csharp_expression()
467 fprintf (stream, "("); in write_csharp_expression()
468 write_csharp_expression (stream, exp->val.args[0], true); in write_csharp_expression()
469 fprintf (stream, " ? "); in write_csharp_expression()
470 write_csharp_expression (stream, exp->val.args[1], false); in write_csharp_expression()
471 fprintf (stream, " : "); in write_csharp_expression()
472 write_csharp_expression (stream, exp->val.args[2], false); in write_csharp_expression()
473 fprintf (stream, ")"); in write_csharp_expression()
484 fprintf (stream, "("); in write_csharp_expression()
485 write_csharp_expression (stream, exp, true); in write_csharp_expression()
486 fprintf (stream, " ? 1 : 0)"); in write_csharp_expression()
500 write_csharp_code (FILE *stream, const char *culture_name, const char *class_name, message_list_ty … in write_csharp_code() argument
507 fprintf (stream, in write_csharp_code()
512 fprintf (stream, "using GNU.Gettext;\n"); in write_csharp_code()
517 fprintf (stream, "[assembly: System.Reflection.AssemblyCulture("); in write_csharp_code()
518 write_csharp_string (stream, culture_name); in write_csharp_code()
519 fprintf (stream, ")]\n"); in write_csharp_code()
524 fprintf (stream, "namespace "); in write_csharp_code()
525 fwrite (class_name, 1, last_dot - class_name, stream); in write_csharp_code()
526 fprintf (stream, " {\n"); in write_csharp_code()
531 fprintf (stream, "public class %s : GettextResourceSet {\n", in write_csharp_code()
541 fprintf (stream, " public %s ()\n", class_name_last_part); in write_csharp_code()
542 fprintf (stream, " : base () {\n"); in write_csharp_code()
543 fprintf (stream, " }\n"); in write_csharp_code()
546 fprintf (stream, " private bool TableInitialized;\n"); in write_csharp_code()
549 fprintf (stream, " protected override void ReadResources () {\n"); in write_csharp_code()
555 fprintf (stream, " if (!TableInitialized) {\n"); in write_csharp_code()
556 fprintf (stream, " lock (this) {\n"); in write_csharp_code()
557 fprintf (stream, " if (!TableInitialized) {\n"); in write_csharp_code()
561 fprintf (stream, " if (Table == null)\n"); in write_csharp_code()
562 fprintf (stream, " Table = new System.Collections.Hashtable();\n"); in write_csharp_code()
563 fprintf (stream, " System.Collections.Hashtable t = Table;\n"); in write_csharp_code()
566 fprintf (stream, " t.Add("); in write_csharp_code()
567 write_csharp_msgid (stream, mlp->item[j]); in write_csharp_code()
568 fprintf (stream, ","); in write_csharp_code()
569 write_csharp_msgstr (stream, mlp->item[j]); in write_csharp_code()
570 fprintf (stream, ");\n"); in write_csharp_code()
572 fprintf (stream, " TableInitialized = true;\n"); in write_csharp_code()
573 fprintf (stream, " }\n"); in write_csharp_code()
574 fprintf (stream, " }\n"); in write_csharp_code()
575 fprintf (stream, " }\n"); in write_csharp_code()
576 fprintf (stream, " }\n"); in write_csharp_code()
581 fprintf (stream, " public static System.Collections.Hashtable GetMsgidPluralTable () {\n"); in write_csharp_code()
582 … fprintf (stream, " System.Collections.Hashtable t = new System.Collections.Hashtable();\n"); in write_csharp_code()
586 fprintf (stream, " t.Add("); in write_csharp_code()
587 write_csharp_msgid (stream, mlp->item[j]); in write_csharp_code()
588 fprintf (stream, ","); in write_csharp_code()
589 write_csharp_string (stream, mlp->item[j]->msgid_plural); in write_csharp_code()
590 fprintf (stream, ");\n"); in write_csharp_code()
592 fprintf (stream, " return t;\n"); in write_csharp_code()
593 fprintf (stream, " }\n"); in write_csharp_code()
607 fprintf (stream, " protected override long PluralEval (long n) {\n"); in write_csharp_code()
608 fprintf (stream, " return "); in write_csharp_code()
609 write_csharp_expression (stream, plural, false); in write_csharp_code()
610 fprintf (stream, ";\n"); in write_csharp_code()
611 fprintf (stream, " }\n"); in write_csharp_code()
615 fprintf (stream, "}\n"); in write_csharp_code()
619 fprintf (stream, "}\n"); in write_csharp_code()