Lines Matching refs:printf
97 printf("\n"); in emptyline()
101 printf("// Auto generated file. Do not modify\n"); in generateHead()
103 printf("#include \"%s.h\"\n", header); in generateHead()
120 printf("IncidentSection const INCIDENT_SECTIONS[] = {\n"); in generateIncidentSectionsCpp()
126 printf(" { %d, \"%s\" }", field->number(), field->name().c_str()); in generateIncidentSectionsCpp()
128 printf(",\n"); in generateIncidentSectionsCpp()
130 printf("\n"); in generateIncidentSectionsCpp()
133 printf("};\n"); in generateIncidentSectionsCpp()
135 printf("const int INCIDENT_SECTION_COUNT = %d;\n", N); in generateIncidentSectionsCpp()
148 printf(" \"%s\",", arg.c_str()); in splitAndPrint()
178 printf("Privacy %s = { %d, %d, %s, %d, %s };%s\n", name.c_str(), field->number(), field->type(), in printPrivacy()
354 printf("const char* %s_patterns[] = {\n", fieldName.c_str()); in generatePrivacyFlags()
357 printf(" \"%s\",\n", replaceAll(p.patterns(j), '\\', "\\\\").c_str()); in generatePrivacyFlags()
359 printf(" NULL };\n"); in generatePrivacyFlags()
384 printf("Privacy* %s[] = {\n", messageName.c_str()); in generatePrivacyFlags()
388 printf(" &%s,\n", getFieldName(field).c_str()); in generatePrivacyFlags()
391 printf(" NULL };\n"); in generatePrivacyFlags()
400 printf("namespace android {\n"); in generateSectionListCpp()
401 printf("namespace os {\n"); in generateSectionListCpp()
402 printf("namespace incidentd {\n"); in generateSectionListCpp()
405 printf("// Generate SECTION_LIST.\n\n"); in generateSectionListCpp()
407 printf("const Section* SECTION_LIST[] = {\n"); in generateSectionListCpp()
419 printf("#if ALLOW_RESTRICTED_SECTIONS\n"); in generateSectionListCpp()
426 printf(" new FileSection(%d, \"%s\"),\n", field->number(), s.args().c_str()); in generateSectionListCpp()
429 printf(" new CommandSection(%d,", field->number()); in generateSectionListCpp()
431 printf(" NULL),\n"); in generateSectionListCpp()
434 printf(" new DumpsysSection(%d, ", field->number()); in generateSectionListCpp()
436 printf(" NULL),\n"); in generateSectionListCpp()
439 printf(" new LogSection(%d, %s),\n", field->number(), s.args().c_str()); in generateSectionListCpp()
442 printf(" new GZipSection(%d,", field->number()); in generateSectionListCpp()
444 printf(" NULL),\n"); in generateSectionListCpp()
447 printf(" new TombstoneSection(%d, \"%s\"),\n", field->number(), in generateSectionListCpp()
452 printf("#endif\n"); in generateSectionListCpp()
455 printf(" NULL };\n"); in generateSectionListCpp()
458 printf("// =============================================================================\n"); in generateSectionListCpp()
462 printf("// Generate PRIVACY_POLICY_LIST.\n\n"); in generateSectionListCpp()
473 printf("\n// Incident Report Section: %s (%d)\n", field->name().c_str(), field->number()); in generateSectionListCpp()
485 printf("// default %s: fieldDest=%d incidentDest=%d\n", fieldName.c_str(), in generateSectionListCpp()
498 printf("Privacy* privacyArray[] = {\n"); in generateSectionListCpp()
501 printf(" &%s,\n", getFieldName(fieldsInOrder[i]).c_str()); in generateSectionListCpp()
504 printf("};\n\n"); in generateSectionListCpp()
505 … printf("const Privacy** PRIVACY_POLICY_LIST = const_cast<const Privacy**>(privacyArray);\n\n"); in generateSectionListCpp()
506 printf("const int PRIVACY_POLICY_COUNT = %d;\n", policyCount); in generateSectionListCpp()
512 printf("static const Privacy** createList() {\n"); in generateSectionListCpp()
514 printf(" %s;\n", gSelfRecursionAssignments[i].c_str()); in generateSectionListCpp()
516 … printf(" Privacy** privacyArray = (Privacy**)malloc(%d * sizeof(Privacy**));\n", policyCount); in generateSectionListCpp()
520 … printf(" privacyArray[%d] = &%s;\n", policyCount++, getFieldName(fieldsInOrder[i]).c_str()); in generateSectionListCpp()
522 printf(" return const_cast<const Privacy**>(privacyArray);\n"); in generateSectionListCpp()
523 printf("}\n\n"); in generateSectionListCpp()
524 printf("const Privacy** PRIVACY_POLICY_LIST = createList();\n\n"); in generateSectionListCpp()
525 printf("const int PRIVACY_POLICY_COUNT = %d;\n", policyCount); in generateSectionListCpp()
528 printf("} // incidentd\n"); in generateSectionListCpp()
529 printf("} // os\n"); in generateSectionListCpp()
530 printf("} // android\n"); in generateSectionListCpp()
567 printf("%s%s,\n", indent.c_str(), replace_string(text.str(), '\n', ' ').c_str()); in generateCsv()
599 printf("%s\n", field->name().c_str()); in main()