/
output.txt
247 lines (227 loc) · 8.11 KB
/
output.txt
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
Script started on Sat 27 Oct 2018 11:36:49 PM HST
]0;kobyv@uhx02:~/project1[?1034huhx02:/home/k/kobyv/project1% ls
output.txt [0m[38;5;27mSCCS[0m
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% sccs get getrelease
get: warning: SCCS/s.getrelease: No id keywords.
1.1
5 lines
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% ls
getrelease output.txt [0m[38;5;27mSCCS[0m
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% chmod 755 getrelease
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% ls
[0m[38;5;34mgetrelease[0m output.txt [38;5;27mSCCS[0m
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% ./getrelease
get: warning: SCCS/s.main.c: No id keywords.
1.1
172 lines
get: warning: SCCS/s.linkedlist.c: No id keywords.
1.1
475 lines
get: warning: SCCS/s.record.h: No id keywords.
1.1
7 lines
get: warning: SCCS/s.Makefile: No id keywords.
1.1
7 lines
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% ls
[0m[38;5;34mgetrelease[0m linkedlist.c main.c Makefile output.txt record.h [38;5;27mSCCS[0m
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% make
gcc -ansi -pedantic-errors -Wall -c main.c
[01m[Kmain.c:[m[K In function ‘[01m[Kmain[m[K’:
[01m[Kmain.c:130:13:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%s[m[K’ expects argument of type ‘[01m[Kchar *[m[K’, but argument 2 has type ‘[01m[Kchar (*)[100][m[K’ [-Wformat=]
scanf("%s", &name);
[01;32m[K ^[m[K
gcc -ansi -pedantic-errors -Wall -c linkedlist.c
[01m[Klinkedlist.c:[m[K In function ‘[01m[KaddRecord[m[K’:
[01m[Klinkedlist.c:40:23:[m[K [01;35m[Kwarning: [m[Kimplicit declaration of function ‘[01m[Kmalloc[m[K’ [-Wimplicit-function-declaration]
newNode = (struct record *) malloc(sizeof(struct record));
[01;32m[K ^[m[K
[01m[Klinkedlist.c:40:33:[m[K [01;35m[Kwarning: [m[Kincompatible implicit declaration of built-in function ‘[01m[Kmalloc[m[K’ [enabled by default]
newNode = (struct record *) malloc(sizeof(struct record));
[01;32m[K ^[m[K
[01m[Klinkedlist.c:48:5:[m[K [01;35m[Kwarning: [m[Kimplicit declaration of function ‘[01m[Kstrcpy[m[K’ [-Wimplicit-function-declaration]
strcpy(newNode -> name, nameInput);
[01;32m[K ^[m[K
[01m[Klinkedlist.c:48:5:[m[K [01;35m[Kwarning: [m[Kincompatible implicit declaration of built-in function ‘[01m[Kstrcpy[m[K’ [enabled by default]
[01m[Klinkedlist.c:[m[K In function ‘[01m[KdeleteRecord[m[K’:
[01m[Klinkedlist.c:197:13:[m[K [01;35m[Kwarning: [m[Kimplicit declaration of function ‘[01m[Kfree[m[K’ [-Wimplicit-function-declaration]
free(temp);
[01;32m[K ^[m[K
[01m[Klinkedlist.c:197:13:[m[K [01;35m[Kwarning: [m[Kincompatible implicit declaration of built-in function ‘[01m[Kfree[m[K’ [enabled by default]
[01m[Klinkedlist.c:[m[K In function ‘[01m[KgetAddress[m[K’:
[01m[Klinkedlist.c:339:5:[m[K [01;35m[Kwarning: [m[Kimplicit declaration of function ‘[01m[Kmemset[m[K’ [-Wimplicit-function-declaration]
memset(address, 0, 100);
[01;32m[K ^[m[K
[01m[Klinkedlist.c:339:5:[m[K [01;35m[Kwarning: [m[Kincompatible implicit declaration of built-in function ‘[01m[Kmemset[m[K’ [enabled by default]
[01m[Klinkedlist.c:[m[K In function ‘[01m[KgetAddressFile[m[K’:
[01m[Klinkedlist.c:404:5:[m[K [01;35m[Kwarning: [m[Kincompatible implicit declaration of built-in function ‘[01m[Kmemset[m[K’ [enabled by default]
memset(address, 0, 100);
[01;32m[K ^[m[K
[01m[Klinkedlist.c:[m[K In function ‘[01m[Kreadfile[m[K’:
[01m[Klinkedlist.c:452:13:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint *[m[K’, but argument 3 has type ‘[01m[Kint[m[K’ [-Wformat=]
fscanf(fp, "%d", temp -> accountno);
[01;32m[K ^[m[K
[01m[Klinkedlist.c:465:13:[m[K [01;35m[Kwarning: [m[Kincompatible implicit declaration of built-in function ‘[01m[Kstrcpy[m[K’ [enabled by default]
strcpy(temp -> address, get);
[01;32m[K ^[m[K
gcc -o main main.o linkedlist.o
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% ls
[0m[38;5;34mgetrelease[0m linkedlist.c linkedlist.o [38;5;34mmain[0m main.c main.o Makefile output.txt record.h [38;5;27mSCCS[0m
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% ./make[K[Kin
Welcome to the bank database
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
1
Please enter the account #
1 2
Please enter the name
ko jae ke
Please enter the address, to finish typing address please type '*'
450343
Doel le st.*
This persons account has been added: jake
1
Please enter the account #
34
Please enter the name
mark
Please enter the address, to finish typing address please type '*'
d liincon*
This persons account has been added: mark
1
Please enter the account #
6
Please enter the name
anthony
Please enter the address, to finish typing address please type '*'
king
university*
This persons account has been added: anthony
1
Please enter the account #
1
Please enter the name
david
Please enter the address, to finish typing address please type '*'
home*
This persons account has been added: david
3
print all records
Account #: 1
Name: david
Address:
home*
Account #: 2
Name: jake
Address:
450343
Dole st.*
Account #: 6
Name: anthony
Address:
king
university*
Account #: 34
Name: mark
Address:
liincon*
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
2
Please enter the account no
6
Account #: 6
Name: anthony
Address:
king
university*
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
4
Please enter the account no
6
anthony's record has been removed
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
3
print all records
Account #: 1
Name: david
Address:
home*
Account #: 2
Name: jake
Address:
450343
Dole st.*
Account #: 34
Name: mark
Address:
liincon*
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
4
Please enter the account no
34
mark's record has been removed
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
3
print all records
Account #: 1
Name: david
Address:
home*
Account #: 2
Name: jake
Address:
450343
Dole st.*
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
4
Please enter the account no
1
david's record was deleted.
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
3
print all records
Account #: 2
Name: jake
Address:
450343
Dole st.*
To add a record please enter (1)
To print a record please enter (2)
To print all records please enter (3)
To delete a record please enter (4)
To exit the program please enter (5)
5
]0;kobyv@uhx02:~/project1uhx02:/home/k/kobyv/project1% exit
exit
Script done on Sat 27 Oct 2018 11:39:35 PM HST