10578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato/* 20578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * Copyright (C) 2016 The Android Open Source Project 30578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * 40578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * Licensed under the Apache License, Version 2.0 (the "License"); 50578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * you may not use this file except in compliance with the License. 60578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * You may obtain a copy of the License at 70578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * 80578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * http://www.apache.org/licenses/LICENSE-2.0 90578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * 100578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * Unless required by applicable law or agreed to in writing, software 110578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * distributed under the License is distributed on an "AS IS" BASIS, 120578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * See the License for the specific language governing permissions and 140578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato * limitations under the License. 150578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato */ 160578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato 170578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato#ifndef PRINT_H 180578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato#define PRINT_H 190578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato 200578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato#include "command.h" 210578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato 220578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern bool g_stdoutIsTty; 230578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern char const* g_escapeBold; 240578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern char const* g_escapeRedBold; 250578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern char const* g_escapeGreenBold; 260578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern char const* g_escapeYellowBold; 270578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern char const* g_escapeUnderline; 280578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern char const* g_escapeEndColor; 290578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratoextern char const* g_escapeClearLine; 300578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato 310578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratovoid init_print(); 320578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratovoid print_status(const char* format, ...); 330578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratovoid print_command(const Command& command); 340578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratovoid print_error(const char* format, ...); 350578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratovoid print_warning(const char* format, ...); 360578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratovoid print_one_line(const char* format, ...); 370578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onoratovoid check_error(int err); 380578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato 390578cbc6c527bc09a38a0fcd8b9642c25c8ea023Joe Onorato#endif // PRINT_H 40