[qwaq] Clean up the qwaq directory

Things were getting rather cluttered with everything being qwaq-* and
all in one directory. Now most have lost the qwaq- prefix and have been
moved into subdirectories (non-recursive make).
This commit is contained in:
Bill Currie 2020-03-30 02:34:08 +09:00
parent 4c5ab07347
commit 6ff5b5c101
44 changed files with 167 additions and 177 deletions

View file

@ -1,18 +1,20 @@
AUTOMAKE_OPTIONS= foreign
AUTOMAKE_OPTIONS= foreign subdir-objects
QWAQ_LIBS=@QWAQ_LIBS@
QWAQ_DEPS=@QWAQ_DEPS@
QWAQ_INCS=@QWAQ_INCS@
AM_CPPFLAGS= -I$(top_srcdir)/include $(QWAQ_INCS) $(PTHREAD_CFLAGS)
AM_CPPFLAGS= -I$(srcdir) -I$(top_srcdir)/include $(QWAQ_INCS) $(PTHREAD_CFLAGS)
noinst_PROGRAMS=@QWAQ_TARGETS@ qwaq-app.dat$(EXEEXT) gcd.dat$(EXEEXT)
QFCC_DEP=$(top_builddir)/tools/qfcc/source/qfcc$(EXEEXT)
QFCC=$(top_builddir)/tools/qfcc/source/qfcc
QCSYSTEM=--no-default-paths -I$(top_srcdir)/ruamoko/include -I$(top_srcdir)/include
QWAQ_INC=-I$(srcdir) -I$(srcdir)/builtins -I$(srcdir)/debugger -I$(srcdir)/editor -I$(srcdir)/ui
QCFLAGS=-qq -O -g -Werror
QCPPFLAGS=--no-default-paths -I$(top_srcdir)/ruamoko/include -I$(top_srcdir)/include
QCPPFLAGS=$(QCSYSTEM) -I$(srcdir)
QCLINKFLAGS=--no-default-paths -L$(top_builddir)/ruamoko/lib
QCOMPILE=$(QFCC) $(QCFLAGS) $(QCPPFLAGS)
QLINK=$(QFCC) $(QCFLAGS) $(QCLINKFLAGS)
@ -24,34 +26,37 @@ SUFFIXES=.o .r
@$(am__mv) $(DEPDIR)/$*.Tqo $(DEPDIR)/$*.Qo
qwaq_app_dat_src= \
qwaq-app.r \
qwaq-button.r \
qwaq-debugger.r \
qwaq-draw.r \
qwaq-editbuffer.r \
qwaq-editor.r \
qwaq-garray.r \
qwaq-group.r \
qwaq-listener.r \
qwaq-proxyview.r \
qwaq-rect.r \
qwaq-screen.r \
qwaq-textcontext.r \
qwaq-titlebar.r \
qwaq-view.r \
qwaq-window.r
qwaq-app.r \
debugger/debugger.r \
editor/editbuffer.r \
editor/editor.r \
ui/button.r \
ui/draw.r \
ui/garray.r \
ui/group.r \
ui/listener.r \
ui/proxyview.r \
ui/rect.r \
ui/textcontext.r \
ui/titlebar.r \
ui/view.r \
ui/window.r \
$e
#FIXME this coupling is horrible
qwaq_curses_libs= \
$(top_builddir)/libs/video/targets/libvid_common.la \
$(top_builddir)/libs/console/libQFconsole.la \
$(top_builddir)/libs/gib/libQFgib.la
qwaq_curses_SOURCES= \
main.c \
qwaq-curses.c \
qwaq-debug.c \
qwaq-editbuffer-bi.c \
qwaq-input.c
builtins/main.c \
builtins/curses.c \
builtins/debug.c \
builtins/editbuffer.c \
builtins/input.c \
$e
qwaq_curses_LDADD= $(qwaq_curses_libs) $(QWAQ_LIBS) \
$(PANEL_LIBS) $(CURSES_LIBS) $(PTHREAD_LDFLAGS) $(DL_LIBS)
qwaq_curses_LDFLAGS=
@ -74,7 +79,7 @@ qwaq_x11_libs= \
$(top_builddir)/libs/video/targets/libQFx11.la \
$(client_libs) \
$(top_builddir)/libs/gib/libQFgib.la
qwaq_x11_SOURCES=qwaq.c qwaq-bi.c
qwaq_x11_SOURCES=builtins/qwaq.c builtins/qwaq-bi.c
qwaq_x11_LDADD= $(qwaq_x11_libs) $(QWAQ_LIBS) \
$(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
$(X_EXTRA_LIBS) $(X_SHM_LIB) $(DL_LIBS)

View file

@ -1,5 +1,5 @@
/*
qwaq-curses.c
curses.c
Ruamoko ncurses wrapper using threading
@ -47,9 +47,9 @@
#include "QF/sys.h"
#include "qwaq.h"
#include "qwaq-curses.h"
#include "qwaq-rect.h"
#include "qwaq-textcontext.h"
#include "ui/curses.h"
#include "ui/rect.h"
#include "ui/textcontext.h"
#define always_inline inline __attribute__((__always_inline__))
#define CMD_SIZE(x) sizeof(x)/sizeof(x[0])

View file

@ -1,5 +1,5 @@
/*
qwaq-debug.c
debug.c
Debugging support
@ -47,9 +47,9 @@
#include "QF/sys.h"
#include "qwaq.h"
#include "event.h"
#include "qwaq-curses.h"
#include "qwaq-debug.h"
#include "ui/event.h"
#include "ui/curses.h"
#include "debugger/debug.h"
typedef struct qwaq_target_s {
progs_t *pr;

View file

@ -11,7 +11,7 @@
#include "QF/txtbuffer.h"
#include "qwaq.h"
#include "qwaq-editbuffer.h"
#include "editor/editbuffer.h"
#define always_inline inline __attribute__((__always_inline__))

View file

@ -1,5 +1,5 @@
/*
qwaq-input.c
input.c
Input handling
@ -47,8 +47,8 @@
#include "QF/sys.h"
#include "qwaq.h"
#include "event.h"
#include "qwaq-curses.h"
#include "ui/event.h"
#include "ui/curses.h"
#define always_inline inline __attribute__((__always_inline__))

View file

@ -53,7 +53,7 @@
#include "QF/zone.h"
#include "qwaq.h"
#include "qwaq-debug.h"
#include "debugger/debug.h"
#define MAX_EDICTS 1024

View file

@ -1,7 +1,7 @@
#ifndef __qwaq_debug_h
#define __qwaq_debug_h
#ifndef __qwaq_debugger_debug_h
#define __qwaq_debugger_debug_h
#include "event.h"
#include "ui/event.h"
typedef enum {
qe_debug_event = 0x0100,
@ -82,4 +82,4 @@ void QWAQ_DebugTarget_Init (progs_t *pr);
#endif
#endif//__qwaq_debug_h
#endif//__qwaq_debugger_debug_h

View file

@ -1,9 +1,9 @@
#ifndef __qwaq_debugger_h
#define __qwaq_debugger_h
#ifndef __qwaq_debugger_debugger_h
#define __qwaq_debugger_debugger_h
#include <Object.h>
#include "qwaq-debug.h"
#include "debugger/debug.h"
@class ProxyView;
@class Editor;
@ -33,4 +33,4 @@
-handleDebugEvent;
@end
#endif//__qwaq_debugger_h
#endif//__qwaq_debugger_debugger_h

View file

@ -3,13 +3,13 @@
#include <string.h>
#include <types.h>
#include "ui/curses.h"
#include "ui/listener.h"
#include "ui/proxyview.h"
#include "ui/window.h"
#include "debugger/debugger.h"
#include "editor/editor.h"
#include "qwaq-app.h"
#include "qwaq-curses.h"
#include "qwaq-debugger.h"
#include "qwaq-editor.h"
#include "qwaq-listener.h"
#include "qwaq-proxyview.h"
#include "qwaq-window.h"
@implementation Debugger
-(qdb_target_t)debug_target
@ -66,6 +66,7 @@
[locals_window setTitle: "Locals"];
locals_view = [[View alloc] initWithRect: {{1, 1}, {38, 8}}
options: ofCanFocus];
[locals_view setGrowMode:gfGrowHi];
[locals_window insertSelected: locals_view];
[application addView: locals_window];

View file

@ -1,5 +1,5 @@
#ifndef __qwaq_editbuffer_h
#define __qwaq_editbuffer_h
#ifndef __qwaq_editor_editbuffer_h
#define __qwaq_editor_editbuffer_h
#ifdef __QFCC__
#include <Object.h>
@ -79,4 +79,4 @@ typedef struct qwaq_editbuffer_s {
#endif//!__QFCC__
#endif//__qwaq_editbuffer_h
#endif//__qwaq_editor_editbuffer_h

View file

@ -1,4 +1,4 @@
#include "qwaq-editbuffer.h"
#include "editor/editbuffer.h"
@implementation EditBuffer
- init = #0;

View file

@ -1,8 +1,8 @@
#ifndef __qwaq_editor_h
#define __qwaq_editor_h
#ifndef __qwaq_editor_editor_h
#define __qwaq_editor_editor_h
#include "qwaq-editbuffer.h"
#include "qwaq-view.h"
#include "editor/editbuffer.h"
#include "ui/view.h"
@class Editor;
@class EditBuffer;
@ -35,4 +35,4 @@
-(string)getWordAt:(Point) pos; // view relative coordinates
@end
#endif//__qwaq_editor_h
#endif//__qwaq_editor_editor_h

View file

@ -1,7 +1,7 @@
#include <QF/keys.h>
#include "qwaq-app.h"
#include "qwaq-editor.h"
#include "qwaq-listener.h"
#include "editor/editor.h"
#include "ui/listener.h"
@implementation Editor

View file

@ -1,16 +0,0 @@
qwaq.dat
@srcdir@/defs.qc
@top_srcdir@/ruamoko/lib/plist.r
@top_srcdir@/ruamoko/lib/qfile.r
@top_srcdir@/ruamoko/lib/script.r
@top_srcdir@/ruamoko/lib/string.r
@top_srcdir@/ruamoko/lib/Object.r
@top_srcdir@/ruamoko/lib/Protocol.r
@top_srcdir@/ruamoko/lib/Array.r
@top_srcdir@/ruamoko/lib/Array+Private.r
@top_srcdir@/ruamoko/lib/AutoreleasePool.r
@srcdir@/test.r
@srcdir@/types.r
@srcdir@/main.qc

View file

@ -3,8 +3,8 @@
#include <Object.h>
#include "event.h"
#include "qwaq-rect.h"
#include "ui/event.h"
#include "ui/rect.h"
@class Array;
@class Group;

View file

@ -3,12 +3,12 @@ int fence;
#include <AutoreleasePool.h>
#include <key.h>
#include "color.h"
#include "ui/color.h"
#include "ui/curses.h"
#include "ui/group.h"
#include "ui/view.h"
#include "debugger/debugger.h"
#include "qwaq-app.h"
#include "qwaq-curses.h"
#include "qwaq-debugger.h"
#include "qwaq-group.h"
#include "qwaq-view.h"
int color_palette[64];

View file

@ -1,8 +1,8 @@
#ifndef __qwaq_button_h
#define __qwaq_button_h
#ifndef __qwaq_ui_button_h
#define __qwaq_ui_button_h
#include "qwaq-draw.h"
#include "qwaq-view.h"
#include "ui/draw.h"
#include "ui/view.h"
@class ListenerGroup;
@ -34,4 +34,4 @@
- (Point) delta;
@end
#endif//__qwaq_button_h
#endif//__qwaq_ui_button_h

View file

@ -1,5 +1,5 @@
#include "qwaq-button.h"
#include "qwaq-listener.h"
#include "ui/button.h"
#include "ui/listener.h"
@implementation Button
-initWithPos: (Point) pos releasedIcon: (DrawBuffer *) released

View file

@ -1,5 +1,5 @@
#ifndef __qwaq_color_h
#define __qwaq_color_h
#ifndef __qwaq_ui_color_h
#define __qwaq_ui_color_h
#ifndef COLOR_PAIR
// double protection in case this header is included in a C file
@ -18,4 +18,4 @@
#endif
#endif//__qwaq_color_h
#endif//__qwaq_ui_color_h

View file

@ -1,7 +1,7 @@
#ifndef __qwaq_curses_h
#define __qwaq_curses_h
#ifndef __qwaq_ui_curses_h
#define __qwaq_ui_curses_h
#include "event.h"
#include "ui/event.h"
typedef struct box_sides_s {
int ls;
@ -18,7 +18,7 @@ typedef struct box_corners_s {
} box_corners_t;
#ifdef __QFCC__
#include "qwaq-rect.h"
#include "ui/rect.h"
// names, order and comments lifted from ncurses.h
typedef enum {
@ -205,4 +205,4 @@ int qwaq_add_event (qwaq_resources_t *res, qwaq_event_t *event);
void qwaq_init_cond (rwcond_t *cond);
#endif
#endif//__qwaq_curses_h
#endif//__qwaq_ui_curses_h

View file

@ -1,9 +1,9 @@
#ifndef __qwaq_draw_h
#define __qwaq_draw_h
#ifndef __qwaq_ui_draw_h
#define __qwaq_ui_draw_h
#include <Object.h>
#include "qwaq-rect.h"
#include "ui/rect.h"
@class DrawBuffer;
@ -43,4 +43,4 @@
- initWithSize: (Extent) size;
@end
#endif
#endif//__qwaq_ui_draw_h

View file

@ -1,7 +1,7 @@
#include <string.h>
#include "qwaq-curses.h"
#include "qwaq-draw.h"
#include "ui/curses.h"
#include "ui/draw.h"
@implementation DrawBuffer

View file

@ -1,5 +1,5 @@
#ifndef __qwaq_event_h
#define __qwaq_event_h
#ifndef __qwaq_ui_event_h
#define __qwaq_ui_event_h
typedef enum {
qe_mousedown = 0x0001,
@ -77,4 +77,4 @@ typedef struct qwaq_event_s {
};
} qwaq_event_t;
#endif//__qwaq_event_h
#endif//__qwaq_ui_event_h

View file

@ -1,5 +1,5 @@
#ifndef __qwaq_garray_h
#define __qwaq_garray_h
#ifndef __qwaq_ui_garray_h
#define __qwaq_ui_garray_h
#include <Array.h>
@ -26,4 +26,4 @@ typedef BOOL condition_func2 (id object, void *anObject, void *data);
with: (void *)data;
@end
#endif//__qwaq_garray_h
#endif//__qwaq_ui_garray_h

View file

@ -1,6 +1,6 @@
#include <Array.h>
#include "event.h"
#include "qwaq-garray.h"
#include "ui/event.h"
#include "ui/garray.h"
@implementation Array (Group)
- (void) makeObjectsPerformSelector: (SEL)selector

View file

@ -1,10 +1,10 @@
#ifndef __qwaq_group_h
#define __qwaq_group_h
#ifndef __qwaq_ui_group_h
#define __qwaq_ui_group_h
#include <Array.h>
#include "event.h"
#include "qwaq-draw.h"
#include "ui/event.h"
#include "ui/draw.h"
@class View;
@ -40,4 +40,4 @@
-(void) releaseMouse;
@end
#endif//__qwaq_group_h
#endif//__qwaq_ui_group_h

View file

@ -1,9 +1,9 @@
#include <Array.h>
#include "event.h"
#include "qwaq-draw.h"
#include "qwaq-garray.h"
#include "qwaq-group.h"
#include "qwaq-view.h"
#include "ui/event.h"
#include "ui/draw.h"
#include "ui/garray.h"
#include "ui/group.h"
#include "ui/view.h"
@implementation Group

View file

@ -1,5 +1,5 @@
#ifndef __qwaq_listener_h
#define __qwaq_listener_h
#ifndef __qwaq_ui_listener_h
#define __qwaq_ui_listener_h
#include <Object.h>
@ -28,4 +28,4 @@
-(void) respond: (void *) caller_data withObject:(void *)anObject;
@end
#endif//__qwaq_listener_h
#endif//__qwaq_ui_listener_h

View file

@ -1,6 +1,6 @@
#include <Array.h>
#include "qwaq-listener.h"
#include "ui/listener.h"
@class Array;

View file

@ -1,7 +1,7 @@
#ifndef __qwaq_proxyview_h
#define __qwaq_proxyview_h
#ifndef __qwaq_ui_proxyview_h
#define __qwaq_ui_proxyview_h
#include "qwaq-view.h"
#include "ui/view.h"
@class Group;
@ -17,4 +17,4 @@
@interface ProxyView (View) <View, TextContext>
@end
#endif//__qwaq_proxyview_h
#endif//__qwaq_ui_proxyview_h

View file

@ -1,5 +1,5 @@
#include "qwaq-group.h"
#include "qwaq-proxyview.h"
#include "ui/group.h"
#include "ui/proxyview.h"
@implementation ProxyView
- (void) forward: (SEL) sel : (@va_list) args

View file

@ -1,5 +1,5 @@
#ifndef __qwaq_rect_h
#define __qwaq_rect_h
#ifndef __qwaq_ui_rect_h
#define __qwaq_ui_rect_h
typedef struct Point_s {
int x;
@ -25,4 +25,4 @@ int rectContainsPoint (Rect rect, Point point);
Rect clipRect (Rect clipRect, Rect rect);
#endif
#endif//__qwaq_rect_h
#endif//__qwaq_ui_rect_h

View file

@ -1,4 +1,4 @@
#include "qwaq-rect.h"
#include "ui/rect.h"
Rect
clipRect (Rect clipRect, Rect rect)

View file

@ -1,11 +1,11 @@
#ifndef __qwaq_textcontect_h
#define __qwaq_textcontect_h
#ifndef __qwaq_ui_textcontect_h
#define __qwaq_ui_textcontect_h
#ifdef __QFCC__
#include <Object.h>
#include "qwaq-curses.h"
#include "qwaq-draw.h"
#include "qwaq-rect.h"
#include "ui/curses.h"
#include "ui/draw.h"
#include "ui/rect.h"
@class DrawBuffer;
@ -79,4 +79,4 @@ typedef struct qwaq_textcontext_s {
#endif
#endif//__qwaq_textcontect_h
#endif//__qwaq_ui_textcontect_h

View file

@ -1,5 +1,5 @@
#include "qwaq-draw.h"
#include "qwaq-textcontext.h"
#include "ui/draw.h"
#include "ui/textcontext.h"
@implementation TextContext
+ (int) is_initialized = #0;

View file

@ -1,7 +1,7 @@
#ifndef __qwaq_titlebar_h
#define __qwaq_titlebar_h
#ifndef __qwaq_ui_titlebar_h
#define __qwaq_ui_titlebar_h
#include "qwaq-view.h"
#include "ui/view.h"
@interface TitleBar : View
{
@ -13,4 +13,4 @@
-setTitle:(string) newTitle;
@end
#endif//__qwaq_titlebar_h
#endif//__qwaq_ui_titlebar_h

View file

@ -1,7 +1,7 @@
#include <string.h>
#include "qwaq-group.h"
#include "qwaq-titlebar.h"
#include "ui/group.h"
#include "ui/titlebar.h"
@implementation TitleBar

View file

@ -1,12 +1,12 @@
#ifndef __qwaq_view_h
#define __qwaq_view_h
#ifndef __qwaq_ui_view_h
#define __qwaq_ui_view_h
#include <Array.h>
#include <Object.h>
#include "qwaq-draw.h"
#include "qwaq-rect.h"
#include "qwaq-textcontext.h"
#include "ui/draw.h"
#include "ui/rect.h"
#include "ui/textcontext.h"
@class Group;
@class ListenerGroup;
@ -120,4 +120,4 @@ enum {
@interface View (TextContext) <TextContext>
@end
#endif//__qwaq_view_h
#endif//__qwaq_ui_view_h

View file

@ -1,7 +1,7 @@
#include "qwaq-curses.h"
#include "qwaq-listener.h"
#include "qwaq-view.h"
#include "qwaq-group.h"
#include "ui/curses.h"
#include "ui/listener.h"
#include "ui/view.h"
#include "ui/group.h"
@implementation View

View file

@ -1,5 +1,5 @@
#ifndef __qwaq_window_h
#define __qwaq_window_h
#ifndef __qwaq_ui_window_h
#define __qwaq_ui_window_h
#include "Object.h"
@ -7,9 +7,9 @@
@class Button;
@class TitleBar;
#include "qwaq-draw.h"
#include "qwaq-rect.h"
#include "qwaq-view.h"
#include "ui/draw.h"
#include "ui/rect.h"
#include "ui/view.h"
@interface Window: View
{
@ -36,4 +36,4 @@
-insertSelected: (View *) view;
@end
#endif//__qwaq_window_h
#endif//__qwaq_ui_window_h

View file

@ -1,14 +1,14 @@
#include <Array.h>
#include <string.h>
#include "event.h"
#include "qwaq-button.h"
#include "qwaq-curses.h"
#include "qwaq-group.h"
#include "qwaq-listener.h"
#include "qwaq-titlebar.h"
#include "qwaq-window.h"
#include "qwaq-view.h"
#include "ui/event.h"
#include "ui/button.h"
#include "ui/curses.h"
#include "ui/group.h"
#include "ui/listener.h"
#include "ui/titlebar.h"
#include "ui/window.h"
#include "ui/view.h"
@implementation Window