summaryrefslogtreecommitdiff
path: root/emulators/ia64sim/patches/patch-ad
blob: 70b42b7e30d62dab3617c06df1d6f63488e6cef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
$NetBSD: patch-ad,v 1.3 2001/02/20 11:33:53 wiz Exp $

--- ia64sim.c.orig	Wed Mar  8 04:54:20 2000
+++ ia64sim.c
@@ -98,7 +98,7 @@
          stop(); /* Clear pending register hazzards */
       }
       else {
-         i1 = strtoll(first+1, &junk, 0);
+         i1 = strtoq(first+1, &junk, 0);
          if(*junk) {
             printf("3syntax error\n");
             return;
@@ -138,7 +138,7 @@
       }
    }
    else {
-      i1 = strtoll(first, &junk, 0);
+      i1 = strtoq(first, &junk, 0);
       if(*junk) {
          printf("6syntax error\n");
          return;
@@ -159,7 +159,7 @@
          size2 = sizeof(uint64);
       }
       else {
-         i2 = strtoll(second+1, &junk, 0);
+         i2 = strtoq(second+1, &junk, 0);
          if(*junk) {
             printf("7syntax error\n");
             return;
@@ -200,7 +200,7 @@
       }
    }
    else {
-      i2 = strtoll(second, &junk, 0);
+      i2 = strtoq(second, &junk, 0);
       if(*junk) {
          printf("Asyntax error\n");
          return;
@@ -289,7 +289,7 @@
 
    base = strtok(NULL, tokens);
    if(base) {
-      temp = strtoll(base, &junk, 0);
+      temp = strtoq(base, &junk, 0);
       if(*junk) {
          printf("2syntax error\n");
          return;
@@ -355,7 +355,7 @@
    }
    if(!second) base = 0;
    else {
-   base = strtoll(second, &junk, 0) & ~15;
+   base = strtoq(second, &junk, 0) & ~15;
    if(*junk) {
       printf("Invalid base address\n");
       return;
@@ -397,7 +397,7 @@
    }
    if(!second) base = 0;
    else {
-   base = strtoll(second, &junk, 0) & ~15;
+   base = strtoq(second, &junk, 0) & ~15;
    if(*junk) {
       printf("Invalid base address\n");
       return;
@@ -436,13 +436,13 @@
       return;
    }
 
-   base = strtoll(second, &junk, 0) & ~15;
+   base = strtoq(second, &junk, 0) & ~15;
    if(*junk) {
       printf("Invalid base address\n");
       return;
    }
 
-   module_size = strtoll(third, &junk, 0) & ~15;
+   module_size = strtoq(third, &junk, 0) & ~15;
    if(*junk) {
       printf("Invalid length\n");
       return;
@@ -512,7 +512,7 @@
      printf("Break point address is required\n"); 
      return;
    }
-   break_address = strtoll(first,&junk,0) & ~15;
+   break_address = strtoq(first,&junk,0) & ~15;
    if(*junk) {
      printf("Invalid break point address\n");
      return;
@@ -556,6 +556,9 @@
    while(1) {
       printf("IA64sim>> ");
       gets(cmd);
+
+      if (feof(stdin))
+         return 0;
 
       nextchar = cmd;
       while(*nextchar) *nextchar++ = tolower(*nextchar);