{"source", no_argument, NULL, 's'},
{"label", no_argument, NULL, 'l'},
{"labelonly", no_argument, NULL, 'L'},
{"source", no_argument, NULL, 's'},
{"label", no_argument, NULL, 'l'},
{"labelonly", no_argument, NULL, 'L'},
-ASMODE asmode = {false, false, false, false, false};
-EXECMODE execmode = {false, false, false};
+/* casl2のエラー定義 */
+CERRARRAY cerr_casl2[] = {
+ { 126, "source file is not specified" },
+};
+bool addcerrlist_casl2()
+{
+ return addcerrlist(sizeof(cerr_casl2), cerr_casl2);
+}
while((opt = getopt_long(argc, argv, "tTdslLao::O::AM:C:h", longopts, NULL)) != -1) {
switch(opt) {
case 's':
while((opt = getopt_long(argc, argv, "tTdslLao::O::AM:C:h", longopts, NULL)) != -1) {
switch(opt) {
case 's':
- (&asmode)->onlyassemblemode = true;
- if(optarg == NULL) {
- objfile = strdup(default_objfile);
- } else {
- objfile = strdup(optarg);
- }
+ asmode.onlyassemble = true;
+ objfile = strdup(objfile_name(optarg));
- if((&execmode)->tracemode == true || (&execmode)->dumpmode == true ||
- (&asmode)->srcmode == true || (&asmode)->labelmode == true ||
- (&asmode)->asdetailmode == true)
+ if(execmode.trace == true || execmode.dump == true || asmode.src == true ||
+ asmode.label == true || asmode.asdetail == true)
{
fprintf(stdout, "\nAssemble %s (%d)\n", argv[i], pass);
}
if((status = assemble(argv[i], pass)) == false) {
{
fprintf(stdout, "\nAssemble %s (%d)\n", argv[i], pass);
}
if((status = assemble(argv[i], pass)) == false) {