]> git.lizzy.rs Git - linenoise.git/commitdiff
add *.exe to ignore, fix gcc warnings
authorstarwing <weasley.wx@gmail.com>
Wed, 6 Jun 2012 03:18:08 +0000 (11:18 +0800)
committerstarwing <weasley.wx@gmail.com>
Wed, 6 Jun 2012 03:18:08 +0000 (11:18 +0800)
.gitignore
linenoise.c

index c7f8ab72788898090fb911e3996946cf58b709ab..f01a0a0a5e207caac4f58790e8fb39ddbe0d672e 100644 (file)
@@ -1 +1,2 @@
 linenoise_example
+*.exe
index 315c2f4a55cee02021fc82f2a4bda89fe5a5206d..ba8ab2a3e3af4b2921e2e90a86bb0d0c225772f4 100644 (file)
@@ -526,7 +526,7 @@ static void clearScreen(struct current *current)
 
 static void cursorToLeft(struct current *current)
 {
-    COORD pos = { 0, current->y };
+    COORD pos = { 0, (SHORT)current->y };
     DWORD n;
 
     FillConsoleOutputAttribute(current->outh,
@@ -536,7 +536,7 @@ static void cursorToLeft(struct current *current)
 
 static int outputChars(struct current *current, const char *buf, int len)
 {
-    COORD pos = { current->x, current->y };
+    COORD pos = { (SHORT)current->x, (SHORT)current->y };
     DWORD n;
        
     WriteConsoleOutputCharacter(current->outh, buf, len, pos, &n);
@@ -546,7 +546,7 @@ static int outputChars(struct current *current, const char *buf, int len)
 
 static void outputControlChar(struct current *current, char ch)
 {
-    COORD pos = { current->x, current->y };
+    COORD pos = { (SHORT)current->x, (SHORT)current->y };
     DWORD n;
 
     FillConsoleOutputAttribute(current->outh, BACKGROUND_INTENSITY, 2, pos, &n);
@@ -556,7 +556,7 @@ static void outputControlChar(struct current *current, char ch)
 
 static void eraseEol(struct current *current)
 {
-    COORD pos = { current->x, current->y };
+    COORD pos = { (SHORT)current->x, (SHORT)current->y };
     DWORD n;
 
     FillConsoleOutputCharacter(current->outh, ' ', current->cols - current->x, pos, &n);
@@ -564,7 +564,7 @@ static void eraseEol(struct current *current)
 
 static void setCursorPos(struct current *current, int x)
 {
-    COORD pos = { x, current->y };
+    COORD pos = { (SHORT)x, (SHORT)current->y };
 
     SetConsoleCursorPosition(current->outh, pos);
     current->x = x;