2020-02-17 04:38:38 +00:00
|
|
|
//
|
|
|
|
// common.c
|
2020-07-13 17:23:33 +00:00
|
|
|
// Steve ][
|
2020-02-17 04:38:38 +00:00
|
|
|
//
|
|
|
|
// Created by Tamas Rudnai on 2/16/20.
|
2020-07-13 17:16:37 +00:00
|
|
|
// Copyright © 2019, 2020 Tamas Rudnai. All rights reserved.
|
2020-07-13 17:10:33 +00:00
|
|
|
//
|
|
|
|
// This file is part of Steve ][ -- The Apple ][ Emulator.
|
|
|
|
//
|
|
|
|
// Steve ][ is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Steve ][ is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Steve ][. If not, see <https://www.gnu.org/licenses/>.
|
2020-02-17 04:38:38 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
|
2024-01-06 15:11:52 +00:00
|
|
|
INLINE int decrement(int num, const int dec) {
|
|
|
|
num -= dec;
|
|
|
|
if (num < 0) {
|
|
|
|
num = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return num;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-02-17 04:38:38 +00:00
|
|
|
FILE * outdev = NULL;
|
|
|
|
|
|
|
|
|