From fcbd1ac7a0fa3d9a147681438b6741afd72fcae8 Mon Sep 17 00:00:00 2001 From: Lowercases Date: Fri, 9 Dec 2011 20:44:52 -0500 Subject: [PATCH] =?UTF-8?q?Imprimir=20versi=C3=B3n=20opcionalmente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gente, como ya no es posible hacer cambios hacia atrás, implementé yo mismo el imprimir versión opcionalmente, pero diferente de como se hace actualmente en 2.x. Si el usuario desea ver la versión, debe setear la variable de entorno XTEBAN_PRINT_VERSION, de esta forma xteban imprime la versión. Esta charrería de cambio efectivamente hace cualquier intento de mergear release-1.1 a 2.x imposible, o al menos, un horrible dolor de cabeza, gracias a esta "genial" implementación. --- xteban.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xteban.c b/xteban.c index 1538686..0529fa3 100644 --- a/xteban.c +++ b/xteban.c @@ -1,4 +1,6 @@ #include +#include +#include #define URL_VIDEO "http://www.youtube.com/watch?v=wC22UvgdKC8\n" #define DAS_VERSIONEN_MAJOR "1" @@ -18,7 +20,11 @@ print_das_versionen(void) { } main() { - print_das_versionen(); + char *s; + + s = getenv("XTEBAN_PRINT_VERSION"); + if (s) + print_das_versionen(); printf("%s", URL_VIDEO);