https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c5d8d8d28903578f7421e72f1dd1bd18fce65fe7

commit c5d8d8d28903578f7421e72f1dd1bd18fce65fe7
Author:     Serge Gautherie <[email protected]>
AuthorDate: Sat Dec 22 02:12:46 2018 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sat Jan 5 13:39:02 2019 +0100

    [LOG2LINES] Use translate_line() for command line input too
    
    NB: Last step would be to re-use translate_files()...
---
 sdk/tools/log2lines/log2lines.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/sdk/tools/log2lines/log2lines.c b/sdk/tools/log2lines/log2lines.c
index 7213781c15..4ee66bb5c9 100644
--- a/sdk/tools/log2lines/log2lines.c
+++ b/sdk/tools/log2lines/log2lines.c
@@ -634,22 +634,20 @@ main(int argc, const char **argv)
         const char *exefile = NULL;
         const char *offset = NULL;
         char Line[LINESIZE + 1];
+        char PathBuffer[LINESIZE + 1];
+        char LineOutBuffer[LINESIZE + 1];
 
         while (i < argc)
         {
-            Line[0] = '\0';
             offset = argv[optCount + i++];
             if (isOffset(offset))
             {
                 if (exefile)
                 {
                     l2l_dbg(2, "translating %s %s\n", exefile, offset);
-                    printf("<%s:%s", exefile, offset);
-                    if (!translate_file(exefile, my_atoi(offset), Line))
-                    {
-                        printf(" (%s)", Line);
-                    }
-                    printf(">\n");
+
+                    sprintf(Line, "<%s:%s>\n", exefile, offset);
+                    translate_line(conOut, Line, PathBuffer, LineOutBuffer);
                     report(conOut);
                 }
                 else

Reply via email to