From 644a80773147bdd3f67bc041ae95d550c128427a Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Tue, 13 Jan 2015 21:26:44 -0500 Subject: [PATCH] Remove all the support stuff --- distro/Makefile | 92 ---- distro/archbsd/git/PKGBUILD | 55 --- distro/archbsd/release/PKGBUILD | 38 -- distro/archbsd/this/Makefile | 5 - distro/archlinux/git/PKGBUILD | 60 --- distro/archlinux/release/PKGBUILD | 38 -- distro/archlinux/this/Makefile | 52 -- distro/deb/Makefile | 45 -- distro/fedora/spec/INSTALL | 31 -- distro/fedora/spec/gmqcc.spec | 96 ---- distro/fedora/this/Makefile | 21 - distro/gentoo/INSTALL | 35 -- distro/gentoo/gmqcc-0.3.0.ebuild | 20 - distro/slackware/this/Makefile | 35 -- distro/slackware/this/slack-desc | 12 - distro/win32/Makefile | 22 - distro/win64/Makefile | 22 - doc/gmqpak.1 | 39 -- doc/html/download.c | 293 ------------ doc/html/gmqcc.png | Bin 2399 -> 0 bytes doc/html/style.css | 92 ---- doc/specification.tex | 759 ------------------------------ syntax/README | 24 - syntax/geany/README | 8 - syntax/geany/filetypes.qc | 55 --- syntax/gtksourceview/README | 5 - syntax/gtksourceview/qc.lang | 173 ------- syntax/jedit/README | 26 - syntax/jedit/qc.xml | 271 ----------- syntax/kate/README | 9 - syntax/kate/qc.xml | 155 ------ syntax/nano/README | 12 - syntax/nano/qc.nanorc | 22 - 33 files changed, 2622 deletions(-) delete mode 100644 distro/Makefile delete mode 100644 distro/archbsd/git/PKGBUILD delete mode 100644 distro/archbsd/release/PKGBUILD delete mode 100644 distro/archbsd/this/Makefile delete mode 100644 distro/archlinux/git/PKGBUILD delete mode 100644 distro/archlinux/release/PKGBUILD delete mode 100644 distro/archlinux/this/Makefile delete mode 100644 distro/deb/Makefile delete mode 100644 distro/fedora/spec/INSTALL delete mode 100644 distro/fedora/spec/gmqcc.spec delete mode 100644 distro/fedora/this/Makefile delete mode 100644 distro/gentoo/INSTALL delete mode 100644 distro/gentoo/gmqcc-0.3.0.ebuild delete mode 100644 distro/slackware/this/Makefile delete mode 100644 distro/slackware/this/slack-desc delete mode 100644 distro/win32/Makefile delete mode 100644 distro/win64/Makefile delete mode 100644 doc/gmqpak.1 delete mode 100644 doc/html/download.c delete mode 100644 doc/html/gmqcc.png delete mode 100644 doc/html/style.css delete mode 100644 doc/specification.tex delete mode 100644 syntax/README delete mode 100644 syntax/geany/README delete mode 100644 syntax/geany/filetypes.qc delete mode 100644 syntax/gtksourceview/README delete mode 100644 syntax/gtksourceview/qc.lang delete mode 100644 syntax/jedit/README delete mode 100644 syntax/jedit/qc.xml delete mode 100644 syntax/kate/README delete mode 100644 syntax/kate/qc.xml delete mode 100644 syntax/nano/README delete mode 100644 syntax/nano/qc.nanorc diff --git a/distro/Makefile b/distro/Makefile deleted file mode 100644 index 3436cca..0000000 --- a/distro/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -DROPBOX := dropbox_uploader.sh -UNAME := $(shell uname -m) -DOWNLOAD:= ../doc/html/download.c -BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -ifneq ($(shell uname -m), x86_64) - $(error Cannot build packages without an x86_64 capable CPU) -endif - -.NOTPARALLEL: base -.NOTPARALLEL: upload - -HEADER=\e[5;32;40m -RESET=\e[0;37;40m -INFO=\e[5;33;40m - -base: - @echo -e "\n$(HEADER)Building Debian packages ...$(RESET)" - @echo -e " $(INFO)=> building 64-bit package$(RESET)" - @$(MAKE) -C deb/ >/dev/null - @echo -e " $(INFO)=> building 32-bit package$(RESET)" - @$(MAKE) -C deb/ CARCH=i686 OPTIONAL_CFLAGS=-m32 OPTIONAL_LDFLAGS=-m32 >/dev/null - - @echo -e "\n$(HEADER)Building ArchLinux packages ...$(RESET)" - @echo -e " $(INFO)=> building 64-bit package$(RESET)" - @$(MAKE) -C archlinux/this/ >/dev/null - @echo -e " $(INFO)=> building 32-bit package$(RESET)" - @$(MAKE) -C archlinux/this/ CARCH=i686 OPTIONAL_CFLAGS=-m32 OPTIONAL_LDFLAGS=-m32 >/dev/null - - @echo -e "\n$(HEADER)Building ArchBSD packages ...$(RESET)" - @echo -e " $(INFO)=> building 64-bit package$(RESET)" - @$(MAKE) -C archbsd/this/ >/dev/null - @echo -e " $(INFO)=> building 32-bit package$(RESET)" - @$(MAKE) -C archbsd/this/ CARCH=i686 OPTIONAL_CFLAGS=-m32 OPTIONAL_LDFLAGS=-m32 >/dev/null - - @echo -e "\n$(HEADER)Building Slackware packages ...$(RESET)" - @echo -e " $(INFO)=> building 64-bit package$(RESET)" - @$(MAKE) -C slackware/this/ >/dev/null - @echo -e " $(INFO)=> building 32-bit package$(RESET)" - @$(MAKE) -C slackware/this/ CARCH=i686 OPTIONAL_CFLAGS=-m32 OPTIONAL_LDFLAGS=-m32 >/dev/null - - @echo -e "\n$(HEADER)Building Fedora packages ...$(RESET)" - @echo -e " $(INFO)=> building 64-bit package$(RESET)" - @$(MAKE) -C fedora/this/ >/dev/null - - @echo -e "\n\$(HEADER)Building Windows packages ...$(RESET)" - @echo -e " $(INFO)=> building 64-bit package$(RESET)" - @$(MAKE) -C win64/ >/dev/null - @echo -e " $(INFO)=> building 32-bit package$(RESET)" - @$(MAKE) -C win32/ >/dev/null - - @rm -rf pkgs/ - @mkdir pkgs/ - @mv deb/*.deb ./pkgs/ - @mv archlinux/this/*pkg.tar.xz ./pkgs/ - @mv archbsd/this/*pkg.tar.xz ./pkgs/ - @mv win32/*.zip ./pkgs/ - @mv win64/*.zip ./pkgs/ - @mv slackware/this/*.txz ./pkgs/ - @mv fedora/this/*.rpm ./pkgs/ - - @echo -e "\n\n$(HEADER)Completed:$(RESET)" - @find ./pkgs/ -type f -regex ".*/.*\.\(xz\|deb\|zip\|txz\|rpm\)" -exec echo -e " $(INFO)=>$(RESET) {}" \; - -upload: - @echo "APPKEY:76vh3q42hnvmzm3" > dropbox_config - @echo "APPSECRET:tmeecht2cmh72xa" >> dropbox_config - @echo "ACCESS_LEVEL:sandbox" >> dropbox_config - @echo "OAUTH_ACCESS_TOKEN:w0bxzf0dft8edfq" >> dropbox_config - @echo "OAUTH_ACCESS_TOKEN_SECRET:9vosx7x8gy4kgjk" >> dropbox_config - @wget -q "http://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" - @chmod +x dropbox_uploader.sh - @sed -i -e "s/~\/.dropbox_uploader/.\/dropbox_config/g" $$(basename $(DROPBOX)) - @find ./pkgs -type f -regex ".*/.*\.\(xz\|deb\|zip\|txz\|rpm\)" -exec ./$$(basename $(DROPBOX)) upload {} \; - @rm dropbox_config dropbox_uploader.sh - -website: - $(CC) $(DOWNLOAD) -o html.gen - @./html.gen ../ - @rm html.gen - @git stash - @git checkout gh-pages - @rm -f ../download.html - @mv -f download.html ../download.html - @cd ..; git add download.html; git commit -m 'update download page'; git push origin gh-pages; - @git checkout $(BRANCH) - @git stash apply - -clean: - @rm -rf pkgs/ - @rm -f *.html - -all: base upload diff --git a/distro/archbsd/git/PKGBUILD b/distro/archbsd/git/PKGBUILD deleted file mode 100644 index f1ec819..0000000 --- a/distro/archbsd/git/PKGBUILD +++ /dev/null @@ -1,55 +0,0 @@ -# Contributor: matthiaskrgr -# Contributor: Wolfgang Bumiller - -pkgname=gmqcc-git -pkgver=20131031 -pkgrel=1 -pkgdesc="An Improved Quake C Compiler" -arch=('i686' 'x86_64') -depends=() -conflicts=('gmqcc') -provides=('gmqcc=0.3.5') -makedepends=('git') -url="https://github.com/graphitemaster/gmqcc.git" -license=('MIT') - -_gitroot="git://github.com/graphitemaster/gmqcc.git" -_gitname="gmqcc" - -build() { - cd $srcdir - msg "Connecting to the GIT server..." - if [[ -d $srcdir/$_gitname ]] ; then - cd $_gitname - msg "Removing build files..." - git clean -dfx - msg "Updating..." - git pull --no-tags - msg "The local files are updated." - else - msg "Cloning..." - git clone $_gitroot $_gitname --depth 1 - msg "Clone done." - fi - - msg "Starting compilation..." - cd "$srcdir"/"$_gitname" - - msg "Compiling..." - gmake -} - -check() { - cd "$srcdir"/"$_gitname" - gmake check -} - -package() { - cd "$srcdir"/"$_gitname" - msg "Compiling and installing to pkgdir this time..." - gmake install DESTDIR=$pkgdir PREFIX=/usr - msg "Compiling done." - - install -dm755 ${pkgdir}/usr/share/licenses/gmqcc - install -m644 LICENSE ${pkgdir}/usr/share/licenses/gmqcc/LICENSE -} diff --git a/distro/archbsd/release/PKGBUILD b/distro/archbsd/release/PKGBUILD deleted file mode 100644 index a57846c..0000000 --- a/distro/archbsd/release/PKGBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Contributor: matthiaskrgr -# Contributor: Wolfgang Bumiller - -pkgname=gmqcc -pkgver=0.3.5 -pkgrel=1 -pkgdesc="An Improved Quake C Compiler" -arch=('i686' 'x86_64') -depends=() -url="https://github.com/graphitemaster/gmqcc.git" -license=('MIT') -source=(gmqcc-$pkgver.zip::https://github.com/graphitemaster/gmqcc/zipball/$pkgver) -sha1sums=('69085478f48f04eefbd2a088c1bd8c266b59f952') - -_gitname=graphitemaster-gmqcc-7f2b206/ - -build() { - msg "Starting compilation..." - cd "$srcdir"/"$_gitname" - - msg "Compiling..." - gmake -} - -check() { - cd "$srcdir"/"$_gitname" - gmake check -} - -package() { - cd "$srcdir"/"$_gitname" - msg "Compiling and installing to pkgdir this time..." - gmake install DESTDIR=$pkgdir PREFIX=/usr - msg "Compiling done." - - install -dm755 ${pkgdir}/usr/share/licenses/gmqcc - install -m644 LICENSE ${pkgdir}/usr/share/licenses/gmqcc/LICENSE -} diff --git a/distro/archbsd/this/Makefile b/distro/archbsd/this/Makefile deleted file mode 100644 index 6bfe650..0000000 --- a/distro/archbsd/this/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - $(MAKE) -f ../../archlinux/this/Makefile \ - LIBC_DEPEND=libc \ - DESTDIR=distro/archbsd/this \ - SUFFIX=archbsd diff --git a/distro/archlinux/git/PKGBUILD b/distro/archlinux/git/PKGBUILD deleted file mode 100644 index 7fbe857..0000000 --- a/distro/archlinux/git/PKGBUILD +++ /dev/null @@ -1,60 +0,0 @@ -# Contributor: matthiaskrgr - -pkgname=gmqcc-git -pkgver=0.3.5 -pkgver(){ - cd gmqcc - git describe --tags | sed -e 's/^gmqcc\-//' -e 's/-/./g' -} -pkgrel=1 -pkgdesc="An Improved Quake C Compiler" -arch=('i686' 'x86_64') -depends=('glibc') -conflicts=('gmqcc') -provides=('gmqcc=0.3.5') -makedepends=('git') -url="https://github.com/graphitemaster/gmqcc.git" -license=('MIT') -source=('gmqcc::git://github.com/graphitemaster/gmqcc.git') -sha1sums=('SKIP') - - -build() { - msg "Starting compilation..." - cd "$srcdir"/"gmqcc" - - msg "Compiling..." - make -} - -check() { - cd "$srcdir"/"gmqcc" - make check -} - -package() { - cd "$srcdir"/"gmqcc" - msg "Compiling and installing to pkgdir this time..." - make install DESTDIR=$pkgdir PREFIX=/usr - msg "Compiling done." - - install -dm755 ${pkgdir}/usr/share/geany - install -m644 syntax/geany/filetypes.qc \ - ${pkgdir}/usr/share/geany/filetypes.qc - - install -dm755 ${pkgdir}/usr/share/gtksourceview-3.0/language-specs - install -m644 syntax/gtksourceview/qc.lang \ - ${pkgdir}/usr/share/gtksourceview-3.0/language-specs/qc.lang - - install -dm755 ${pkgdir}/usr/share/apps/katepart/syntax - install -m644 syntax/kate/qc.xml \ - ${pkgdir}/usr/share/apps/katepart/syntax/qc.xml - - install -dm755 ${pkgdir}/usr/share/nano - install -m644 syntax/nano/qc.nanorc \ - ${pkgdir}/usr/share/nano/qc.nanorc - - install -dm755 ${pkgdir}/usr/share/licenses/gmqcc - install -m644 LICENSE \ - ${pkgdir}/usr/share/licenses/gmqcc/LICENSE -} diff --git a/distro/archlinux/release/PKGBUILD b/distro/archlinux/release/PKGBUILD deleted file mode 100644 index 980ca55..0000000 --- a/distro/archlinux/release/PKGBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Contributor: matthiaskrgr -# Contributor: Wolfgang Bumiller - -pkgname=gmqcc -pkgver=0.3.5 -pkgrel=1 -pkgdesc="An Improved Quake C Compiler" -arch=('i686' 'x86_64') -depends=('glibc') -url="https://github.com/graphitemaster/gmqcc.git" -license=('MIT') -source=(gmqcc-$pkgver.zip::https://github.com/graphitemaster/gmqcc/zipball/$pkgver) -sha1sums=('69085478f48f04eefbd2a088c1bd8c266b59f952') - -_gitname=graphitemaster-gmqcc-7f2b206/ - -build() { - msg "Starting compilation..." - cd "$srcdir"/"$_gitname" - - msg "Compiling..." - make -} - -check() { - cd "$srcdir"/"$_gitname" - make check -} - -package() { - cd "$srcdir"/"$_gitname" - msg "Compiling and installing to pkgdir this time..." - make install DESTDIR=$pkgdir PREFIX=/usr - msg "Compiling done." - - install -dm755 ${pkgdir}/usr/share/licenses/gmqcc - install -m644 LICENSE ${pkgdir}/usr/share/licenses/gmqcc/LICENSE -} diff --git a/distro/archlinux/this/Makefile b/distro/archlinux/this/Makefile deleted file mode 100644 index 91693a4..0000000 --- a/distro/archlinux/this/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -BASEDIR := ../../../ -PREFIX := /usr -HEADER := $(BASEDIR)/gmqcc.h -MAJOR := $(shell sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)) -MINOR := $(shell sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)) -PATCH := $(shell sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)) -PKGREL := 1 -SUFFIX ?= archlinux -CARCH := $(shell uname -m) -PKGDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH)-$(PKGREL)-$(CARCH)-$(SUFFIX) -TARCOMP := -J -PKG := $(PKGDIR).pkg.tar.xz -PKGINFO := $(PKGDIR)/.PKGINFO -DESTDIR := distro/archlinux/this -CFLAGS := - -LIBC_DEPEND := glibc - -base: - $(MAKE) -C $(BASEDIR) clean - CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ - $(MAKE) -C $(BASEDIR) "DESTDIR=$(DESTDIR)/$(PKGDIR)" "PREFIX=$(PREFIX)" strip install - @echo "pkgname = gmqcc" > $(PKGINFO) - @echo "pkgver = $(MAJOR).$(MINOR).$(PATCH)-$(PKGREL)" >> $(PKGINFO) - @echo "pkgdesc = An Improved Quake C Compiler" >> $(PKGINFO) - @echo "url = https://github.com/graphitemaster/gmqcc.git" >> $(PKGINFO) - @echo "builddate = `date -u \"+%s\"`" >> $(PKGINFO) - @echo "packager = Unknown Packager" >> $(PKGINFO) - @echo "size = `du -sk $(PKGDIR) | awk '{print $$1 * 1024}'`" >> $(PKGINFO) - @echo "arch = $(CARCH)" >> $(PKGINFO) - @echo "license = MIT" >> $(PKGINFO) - @echo "conflict = gmqcc" >> $(PKGINFO) - @echo "depend = $(LIBC_DEPEND)" >> $(PKGINFO) - @echo "makepkgopt = strip" >> $(PKGINFO) - @echo "makepkgopt = docs" >> $(PKGINFO) - @echo "makepkgopt = libtool" >> $(PKGINFO) - @echo "makepkgopt = emptydirs" >> $(PKGINFO) - @echo "makepkgopt = zipman" >> $(PKGINFO) - @echo "makepkgopt = purge" >> $(PKGINFO) - @echo "makepkgopt = !upx" >> $(PKGINFO) - @bsdtar -C $(PKGDIR) -czf $(PKGDIR)/.MTREE \ - --format=mtree \ - --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' \ - .PKGINFO usr/ 2>&1 >/dev/null - @bsdtar $(TARCOMP) -cvf $(PKG) -C $(PKGDIR)/ .PKGINFO .MTREE usr/ 2>&1 >/dev/null - @rm -rf $(PKGDIR) - -clean: - $(MAKE) -C $(BASEDIR) clean - @rm -f *.pkg.tar.xz - -all: base diff --git a/distro/deb/Makefile b/distro/deb/Makefile deleted file mode 100644 index fefb3e5..0000000 --- a/distro/deb/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -BASEDIR := ../.. -PREFIX := /usr -HEADER := $(BASEDIR)/gmqcc.h -MAJOR := `sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)` -MINOR := `sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)` -PATCH := `sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)` -DEBDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH) -CARCH := $(shell uname -m) -DEB := $(DEBDIR)-$(CARCH).deb -CONTROL := $(DEBDIR)/DEBIAN/control - -ifneq (, $(findstring i686, $(CARCH))) - CFLAGS += -m32 - LDFLAGS += -m32 -endif - -base: - $(MAKE) -C $(BASEDIR) clean - CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ - $(MAKE) -C $(BASEDIR) DESTDIR=distro/deb/$(DEBDIR) PREFIX=$(PREFIX) strip install - @install -d -m755 $(DEBDIR)/DEBIAN - @echo "Package: gmqcc" > $(CONTROL) - @echo "Version: $(MAJOR).$(MINOR).$(PATCH)" >> $(CONTROL) - @echo "Section: user/hidden" >> $(CONTROL) - @echo "Priority: optional" >> $(CONTROL) - @echo "Architecture: $(CARCH)" >> $(CONTROL) - @echo "Installed-Size: `du -ks $($(DEBDIR)/usr) | cut -f 1`" >> $(CONTROL) - @echo "Maintainer: Dale Weiler " >> $(CONTROL) - @echo "Description: An improved Quake C Compiler" >> $(CONTROL) - @echo " For an enduring period of time the options for a decent compiler for the Quake C programming language" >> $(CONTROL) - @echo " were confined to a specific compiler known as QCC. Attempts were made to extend and improve upon the" >> $(CONTROL) - @echo " design of QCC, but many foreseen the consequences of building on a broken foundation. The solution" >> $(CONTROL) - @echo " was obvious, a new compiler; one born from the NIH realm of sarcastic wit. We welcome you. You won't" >> $(CONTROL) - @echo " find a better Quake C compiler." >> $(CONTROL) - @tar czf data.tar.gz -C $(DEBDIR)/ . --exclude=DEBIAN - @tar czf control.tar.gz -C $(DEBDIR)/DEBIAN/ . - @echo 2.0 > debian-binary - @ar r $(DEB) debian-binary control.tar.gz data.tar.gz 2>&1 >/dev/null - @rm -rf debian-binary control.tar.gz data.tar.gz $(DEBDIR) - -clean: - $(MAKE) -C $(BASEDIR) clean - @rm -f *.deb - -all: base diff --git a/distro/fedora/spec/INSTALL b/distro/fedora/spec/INSTALL deleted file mode 100644 index 8540670..0000000 --- a/distro/fedora/spec/INSTALL +++ /dev/null @@ -1,31 +0,0 @@ -File is constantly updated! - -Since Fedora 19 we have this package in main repos. Please use it! - -For install gmqcc do this: -# yum install gmqcc - -For install qcvm do this: -# yum install qcvm - -For install gmqpak do this: -# yum install gmqpak - -To use the spec files in this fedora directory you need the core -development tools , building enviroment for the user, and -the directory structure for it. If you don't already have these, issue -the following commands. - -# yum groupinstall "Development Tools" -# yum install rpmdevtools -$ rm -rf ~/rpmbuild -$ rpmdev-setuptree - -Prepare and build the RPMs. - -$ cp gmqcc.spec ~/rpmbuild/SPECS/ -$ wget https://github.com/graphitemaster/gmqcc/archive/0.3.5.tar.gz -o ~/rpmbuild/SOURCES/gmqcc-0.3.5.tar.gz -$ rpmbuild -ba ~/rpmbuild/SPECS/gmqcc.spec - -Now we have RPMs in ~/rpmbuild/RPMS/ and you can install it via yum. - diff --git a/distro/fedora/spec/gmqcc.spec b/distro/fedora/spec/gmqcc.spec deleted file mode 100644 index 95fb611..0000000 --- a/distro/fedora/spec/gmqcc.spec +++ /dev/null @@ -1,96 +0,0 @@ -Name: gmqcc -Version: 0.3.6 -Release: 2%{?dist} -Summary: Improved Quake C Compiler -License: MIT -URL: http://graphitemaster.github.io/gmqcc/ -Source0: https://github.com/graphitemaster/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz - -# tests fail on big endians -ExclusiveArch: %{ix86} x86_64 %{arm} - -%description -Modern written-from-scratch compiler for the QuakeC language with -support for many common features found in other QC compilers. - -%package -n qcvm -Summary: Standalone QuakeC VM binary executor - -%description -n qcvm -Executor for QuakeC VM binary files created using a QC compiler such -as gmqcc or fteqcc. It provides a small set of built-in functions, and -by default executes the main function if there is one. Some options -useful for debugging are available as well. - -%package -n gmqpak -Summary: Standalone Quake PAK file utility - -%description -n gmqpak -Standalone Quake PAK file utility supporting the extraction of files, -directories, or whole PAKs, as well as the opposite (creation of PAK files). - -%prep -%setup -q -echo '#!/bin/sh' > ./configure -chmod +x ./configure - -# and for all for all of those switches they increase the runtime of the compile -# making compiles of code slower - -# we don't need compile time buffer protection, we test with clang's address -# sanatizer and valgrind before releases -%global optflags %(echo %{optflags} | sed 's/-D_FORTIFY_SOURCE=2 //') -# there is no exceptions in C -%global optflags %(echo %{optflags} | sed 's/-fexceptions //') -# same with clangs address sanatizer and valgrind testing -%global optflags %(echo %{optflags} | sed 's/-fstack-protector-strong //') -# buffer overflow protection is unrequired since most (if not all) allocations -# happen dynamically and we have our own memory allocator which checks this -# (with valgrind integration), also clang's address santatizer cathes it as -# for grecord-gcc-switches, that just adds pointless information to the binary -# increasing its size -%global optflags %(echo %{optflags} | sed 's/--param=ssp-buffer-size=4 //') - -%build -%configure -make %{?_smp_mflags} - -%install -%make_install PREFIX=%{_prefix} - -%check -make check - -%files -%doc LICENSE README AUTHORS CHANGES TODO -%doc gmqcc.ini.example -%{_mandir}/man1/gmqcc.1* -%{_bindir}/gmqcc - -%files -n qcvm -%doc LICENSE README AUTHORS CHANGES TODO -%{_mandir}/man1/qcvm.1* -%{_bindir}/qcvm - -%files -n gmqpak -%doc LICENSE README AUTHORS CHANGES TODO -%{_mandir}/man1/gmqpak.1* -%{_bindir}/gmqpak - -%changelog -* Sat Nov 16 2013 Dan Horák - 0.3.5-2 -- fix build on big endian arches -- use the standard wildcarded filename for man pages -- and make it Exclusive for little endians because tests fail on big endians - -* Thu Nov 14 2013 Igor Gnatenko - 0.3.5-1 -- 0.3.5 upstream release - -* Thu Sep 26 2013 Igor Gnatenko - 0.3.0-2 -- Optimizing compile flags - -* Fri Sep 20 2013 Igor Gnatenko - 0.3.0-1 -- Update to 0.3.0 (improved new package: gmqpak) - -* Sat Jul 27 2013 Igor Gnatenko - 0.2.9-1 -- Initial release diff --git a/distro/fedora/this/Makefile b/distro/fedora/this/Makefile deleted file mode 100644 index 49b752f..0000000 --- a/distro/fedora/this/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -BASEDIR := $(CURDIR)/../../.. -HEADER := $(BASEDIR)/gmqcc.h -MAJOR := `sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)` -MINOR := `sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)` -PATCH := `sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)` -NAME := gmqcc-$(MAJOR).$(MINOR).$(PATCH) -TARFILE := $(NAME).tar.gz - -all: - @mkdir -p ~/rpmbuild/SPECS - @mkdir -p ~/rpmbuild/SOURCES - @cp ../spec/gmqcc.spec ~/rpmbuild/SPECS - @mkdir -p /tmp/$(NAME) - @cp -R $(BASEDIR) /tmp/$(NAME)/ - @cd /tmp && tar -zcf ~/rpmbuild/SOURCES/$(TARFILE) $(NAME)/ - @rm -rf /tmp/$(NAME) - @rpmbuild -ba ../spec/gmqcc.spec 2>&1 >/dev/null - - @mv ~/rpmbuild/RPMS/x86_64/gmqcc*.rpm . 2>/dev/null; true - @mv ~/rpmbuild/RPMS/x86_64/qcvm*.rpm . 2>/dev/null; true - @mv ~/rpmbuild/RPMS/x86_64/gmqpak*.rpm . 2>/dev/null; true diff --git a/distro/gentoo/INSTALL b/distro/gentoo/INSTALL deleted file mode 100644 index 7a4f778..0000000 --- a/distro/gentoo/INSTALL +++ /dev/null @@ -1,35 +0,0 @@ -To use the ebuilds provided in this gentoo directory you first must -create a directory in your overlay tree. - -If you don't already have your own directory for custom ebuilds, you can -create one. If you already have one, and that directory is set in your -/etc/make.conf for PORTDIR_OVERLAY, this step can be skiped. Otherwise -if you don't already, you can create one as such. - -# mkdir -p /usr/local/portage -# vim /etc/make.conf - Set PORTDIR_OVERLAY=/usr/local/portage - Then save and exit - -Once that is completed, or you skiped that step, you need to create a -directory in your overlay tree for gmqcc, this can be done as such: -(subsitute [[PORTDIR_OVERLAY]] with the one set in /etc/make.conf) - -# mkdir -p [[PORTDIR_OVERLAY]]/gmqcc - -After the directory is created you need to move the correct version ebuild -into that directory depending on which version of GMQCC you want. For -instance, if you want gmqcc 0.3.0, you move gmqcc-0.3.0.ebuild into that -directory. - -# mv gmqcc-{version}.ebuild [[PORTDIR_OVERLAY]]/gmqcc/ - -After the file is moved into your newly created portage overlay tree, you'll -need to build a digest for it with ebuild. A digest is simply a Manifest and -digital signature for the source files used. - -# ebuild gmqcc-0.3.0.ebuild digest - -After the digest is built, you can emerge gmqcc as usual. - -# emerge gmqcc diff --git a/distro/gentoo/gmqcc-0.3.0.ebuild b/distro/gentoo/gmqcc-0.3.0.ebuild deleted file mode 100644 index 28630d3..0000000 --- a/distro/gentoo/gmqcc-0.3.0.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -EAPI=5 - -DESCRIPTION="An Improved Quake C Compiler" -HOMEPAGE="http://graphitemaster.github.com/gmqcc/" -SRC_URI="https://github.com/graphitemaster/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" - -SLOT="0" -IUSE="" -KEYWORDS="~amd64 ~x86" - -src_prepare() { - sed -i -e "s:-Werror ::" Makefile || die -} - -src_install() { - emake install PREFIX="${D}/usr" - dodoc README -} diff --git a/distro/slackware/this/Makefile b/distro/slackware/this/Makefile deleted file mode 100644 index 3c28cb0..0000000 --- a/distro/slackware/this/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -BASEDIR := ../../../ -PREFIX := /usr -HEADER := $(BASEDIR)/gmqcc.h -MAJOR := $(shell sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)) -MINOR := $(shell sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)) -PATCH := $(shell sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)) -CARCH := $(shell uname -m) -PKGDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH)-$(CARCH) -PKG := $(PKGDIR).txz -PKGINFO := $(PKGDIR)/.PKGINFO -DESTDIR := distro/slackware/this/$(PKGDIR) -CFLAGS := - - -ifneq (, $(findstring i686, $(CARCH))) - CFLAGS += -m32 - LDFLAGS += -m32 -endif - -base: - $(MAKE) -C $(BASEDIR) clean - CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ - $(MAKE) -C $(BASEDIR) "DESTDIR=$(DESTDIR)" "PREFIX=$(PREFIX)" strip install - gzip -9 $(PKGDIR)/usr/share/man/man?/*.? - strip -s $(PKGDIR)/usr/bin/* - mkdir $(PKGDIR)/install - cp slack-desc $(PKGDIR)/install - @tar -cJvf $(PKG) -C $(PKGDIR)/ install/ usr/ - @rm -rf $(PKGDIR) - -clean: - $(MAKE) -C $(BASEDIR) clean - @rm -f *.txz - -all: base diff --git a/distro/slackware/this/slack-desc b/distro/slackware/this/slack-desc deleted file mode 100644 index 3384ef9..0000000 --- a/distro/slackware/this/slack-desc +++ /dev/null @@ -1,12 +0,0 @@ - |-----handy-ruler------------------------------------------------------| -gmqcc: gmqcc (Quake C compiler) -gmqcc: -gmqcc: A modern written-from-scratch compiler for the QuakeC language with -gmqcc: support for many common features found in other QC compilers. -gmqcc: Additionally contains a standalone QCVM executor, and a tool to deal -gmqcc: with .pak archive files. -gmqcc: -gmqcc: -gmqcc: github page: -gmqcc: http://github.com/graphitemaster/gmqcc -gmqcc: diff --git a/distro/win32/Makefile b/distro/win32/Makefile deleted file mode 100644 index 20f580c..0000000 --- a/distro/win32/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -BASEDIR := ../.. -HEADER := $(BASEDIR)/gmqcc.h -MAJOR := `sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)` -MINOR := `sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)` -PATCH := `sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)` -BINDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH) - -base: - $(MAKE) CC=i686-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) clean - $(MAKE) CC=i686-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) DESTDIR=distro/win32/$(BINDIR) PREFIX=/ strip install - @mkdir -p $(BINDIR)/doc - @groff -mandoc $(BINDIR)/man1/gmqpak.1 | ps2pdf - $(BINDIR)/doc/gmqpak.pdf - @groff -mandoc $(BINDIR)/man1/qcvm.1 | ps2pdf - $(BINDIR)/doc/qcvm.pdf - @groff -mandoc $(BINDIR)/man1/gmqcc.1 | ps2pdf - $(BINDIR)/doc/gmqcc.pdf - @rm -rf $(BINDIR)/man1/ - @zip -r $(BINDIR)-win32.zip $(BINDIR) - @rm -rf $(BINDIR) -clean: - $(MAKE) -C $(BASEDIR) clean - @rm -f *.zip - -all: base diff --git a/distro/win64/Makefile b/distro/win64/Makefile deleted file mode 100644 index f45f351..0000000 --- a/distro/win64/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -BASEDIR := ../.. -HEADER := $(BASEDIR)/gmqcc.h -MAJOR := `sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)` -MINOR := `sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)` -PATCH := `sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)` -BINDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH) - -base: - $(MAKE) CC=x86_64-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) clean - $(MAKE) CC=x86_64-w64-mingw32-gcc UNAME=MINGW -C $(BASEDIR) DESTDIR=distro/win64/$(BINDIR) PREFIX=/ strip install - @mkdir -p $(BINDIR)/doc - @groff -mandoc $(BINDIR)/man1/gmqpak.1 | ps2pdf - $(BINDIR)/doc/gmqpak.pdf - @groff -mandoc $(BINDIR)/man1/qcvm.1 | ps2pdf - $(BINDIR)/doc/qcvm.pdf - @groff -mandoc $(BINDIR)/man1/gmqcc.1 | ps2pdf - $(BINDIR)/doc/gmqcc.pdf - @rm -rf $(BINDIR)/man1/ - @zip -r $(BINDIR)-win64.zip $(BINDIR) - @rm -rf $(BINDIR) -clean: - $(MAKE) -C $(BASEDIR) clean - @rm -f *.zip - -all: base diff --git a/doc/gmqpak.1 b/doc/gmqpak.1 deleted file mode 100644 index f4ef65d..0000000 --- a/doc/gmqpak.1 +++ /dev/null @@ -1,39 +0,0 @@ -.\" gmqpak mdoc manpage -.Dd April 27, 2013 -.Dt GMQPAK 2 PRM -.Os -.Sh NAME -.Nm gmqpak -.Nd A standalone Quake PAK utility -.Sh SYNOPSIS -.Nm gmqpak -.Op Cm options -.Op Cm files -.Sh DESCRIPTION -.Nm gmqpak -Is a standalone Quake PAK file utility supporting the extraction of files, -directories, or whole PAKs, as well as the opposite (creation of PAK files). -.Sh OPTIONS -.Bl -tag -width indent -.It Fl -file Ar file -Specify the PAK file to create or extract -.It Fl -e -Used to denote the extraction operation on a PAK file. -.It Fl -c -Used to denote the creation operation on a PAK file. -.El -.Sh EXAMPLES -Here's some examples of how to use the utility to manipulate PAK files. -.Bl -ohang -.It Li gmqpak -file id1.pak -e -.D1 extracts a PAK to ./ -.It Li gmqpak -file new.pak -c file1 dir/file2 -.D1 creates a PAK with the files specified -.It Li gmqpak -file new1.pak -c directory. -.D1 creates a PAK from files within the directory, including subdirectories and files. -.El -.Sh AUTHOR -See . -.Sh BUGS -Please report bugs on , -or see on how to contact us. diff --git a/doc/html/download.c b/doc/html/download.c deleted file mode 100644 index f31545c..0000000 --- a/doc/html/download.c +++ /dev/null @@ -1,293 +0,0 @@ -#include -#include -#include -#include - -/* - * protect some information, not that I care, but this is just to stay - * safer. - */ -#define SECURITY_BASE "\ -ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" -#define SECURITY_TOKEN "\ -P29hdXRoX2NvbnN1bWVyX2tleT03NnZoM3E0Mmhudm16bTMmb2F1dGhfdG9rZW49\ -dzBieHpmMGRmdDhlZGZxJm9hdXRoX3NpZ25hdHVyZV9tZXRob2Q9UExBSU5URVhU\ -Jm9hdXRoX3NpZ25hdHVyZT10bWVlY2h0MmNtaDcyeGElMjY5dm9zeDd4OGd5NGtn\ -amsmb2F1dGhfdGltZXN0YW1wPSZvYXV0aF9ub25jZT0xMjE2NQo=" - -int isbase64(char c) { - return !!(c && strchr(SECURITY_BASE, c) != NULL); -} -char value(char c) { - const char *load = SECURITY_BASE; - const char *find = strchr(load, c); - - return (find) ? find - load : 0; -} - -int security_decode(unsigned char *dest, const unsigned char *src, int srclen) { - unsigned char *p; - - if(!*src) - return 0; - - *dest = 0; - p = dest; - - do { - *p++ = (value(src[0]) << 2) | (value(src[1]) >> 4); - *p++ = (value(src[1]) << 4) | (value(src[2]) >> 2); - *p++ = (value(src[2]) << 6) | (value(src[3]) >> 0); - - if(!isbase64(src[1])) { - p -= 2; - break; - } - else if(!isbase64(src[2])) { - p -= 2; - break; - } - else if(!isbase64(src[3])) { - p--; - break; - } - src += 4; - - while(*src && (*src == 13 || *src == 10)) - src++; - } while(srclen-= 4); - - *p = 0; - return p-dest; -} - -#define BASEURL " https://api-content.dropbox.com/1/files/sandbox/" - -/* - * If more platforms are supported add the entries between the start - * tag here, and the end tag below. Nothing else needs to be done - * (the table needs to match the HTML too) - */ -#define ARCHLINUX_32_REF "%sgmqcc-%c.%c.%c-1-i686.pkg.tar.xz%s" -#define ARCHLINUX_64_REF "%sgmqcc-%c.%c.%c-1-x86_64.pkg.tar.xz%s" -#define DEBIAN_32_REF "%sgmqcc-%c.%c.%c-i686.deb%s" -#define DEBIAN_64_REF "%sgmqcc-%c.%c.%c-x86_64.deb%s" -#define WINDOWS_32_REF "%sgmqcc-%c.%c.%c-win32.zip%s" -#define WINDOWS_64_REF "%sgmqcc-%c.%c.%c-win64.zip%s" -#define SLACKWARE_32_REF "%sgmqcc-%c.%c.%c-i686.txz%s" -#define SLACKWARE_64_REF "%sgmqcc-%c.%c.%c-x86_64.txz%s" - - -#define HTML "\ -\ -\ -\ - \ - \ - GMQCC\ - \ - \ - \ - \ - \ -\ -\ -
\ -
\ -
\ -

GMQCC

\ -

An Improved Quake C Compiler

\ - \ -
\ -
\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -
Operating System / Distributionx86 Architecturex86_64 Architecture
ArchlinuxDownloadDownload
DebianDownloadDownload
SlackwareDownloadDownload
WindowsDownloadDownload
\ -
\ -
\ - \ -
\ -
\ - \ -\ -\ -" - -static char build_table[][4096] = { - ARCHLINUX_32_REF, ARCHLINUX_64_REF, - DEBIAN_32_REF, DEBIAN_64_REF, - SLACKWARE_32_REF, SLACKWARE_64_REF, - WINDOWS_32_REF, WINDOWS_64_REF -}; -/*
*/ - -#define ISXDIGIT(c) ((c >= 48 && c <= 57) || ((c & ~0x20) >= 65 && (c & ~0x20) <= 70)) -typedef struct { - char *data; - unsigned int len; - unsigned int size; -} url_t; -void escape(url_t *str) { - char *p, *ptr; - char hexstr[3]; - unsigned int i=0; - unsigned long l=0; - - p = str->data; - for(i=0; i < str->len; i++) { - if((p - str->data) >= str->len) - break; - if(*p == '%' && - ((p - str->data)+2) < str->len && - ISXDIGIT(*(p+1)) && - ISXDIGIT(*(p+2)) - ) { - p++; - hexstr[0] = *p++; - hexstr[1] = *p++; - hexstr[2] = 0; - l = strtoul(hexstr, &ptr, 16); - str->data[i] = (char)(l & 0x7f); - continue; - } - if(*p == '+') { - *p = ' '; - } - str->data[i] = *p++; - } - str->data[i] = 0; - str->len = i; -} - -void version(const char *directory, char *major, char *minor, char *patch) { - FILE *handle; - char file[4096]; - size_t size = 0; - char *data = NULL; - snprintf(file, sizeof(file), "%s/gmqcc.h", directory); - - handle = fopen(file, "r"); - if (!handle) { - fprintf(stderr, "failed to open %s for reading version (%s)\n", - file, strerror(errno) - ); - abort(); - } - - while (getline(&data, &size, handle) != EOF) { - - #define TEST(TYPE, STORE) \ - if (strstr(data, "#define GMQCC_VERSION_" TYPE )) { \ - char *get = data; \ - while (!isdigit(*get)) \ - get++; \ - *STORE = *get; \ - } - - TEST("MAJOR", major) - TEST("MINOR", minor) - TEST("PATCH", patch) - - #undef TEST - } - - free(data); -} - -void genhtml() { - FILE *fp = fopen("download.html", "w"); - if (!fp) { - fprintf(stderr, "failed to generate HTML: %s\n", strerror(errno)); - abort(); - } - - fprintf(fp, HTML, - build_table[0], build_table[1], - build_table[2], build_table[3], - build_table[4], build_table[5], - build_table[6], build_table[7] - ); - fclose (fp); -} - -/* - * Builds a list of download links with the right version and handles the - * rest of the magic. - */ -void build(const char *directory) { - /* Figure out version number */ - char find[3]; - char decode[4096]; - size_t size; - version(directory, &find[0], &find[1], &find[2]); - - /* - * decode the secuity stuff for preparing the URLs which will be used - * as links. - */ - memset(decode, 0, sizeof(decode)); - security_decode(decode, SECURITY_TOKEN, strlen(SECURITY_TOKEN)); - - for (size = 0; size < sizeof(build_table) / sizeof(*build_table); size++) { - char *load = strdup(build_table[size]); - url_t esc = { NULL, 0 }; - - snprintf(build_table[size], 4096, load, BASEURL, find[0], find[1], find[2], decode); - esc.data = strdup(build_table[size]); - esc.size = strlen(build_table[size]); - esc.len = esc.size; - - /* Yes we also need to escape URLs just incase */ - escape(&esc); - free(load); - } - - /* - * Now generate the HTML file for those download links by asking tinyurl to - */ - genhtml(); -} - -int main(int argc, char **argv) { - size_t itr; - - argc--; - argv++; - if (!argc) { - printf("usage: %s [gmqcc.h location]\n", argv[-1]); - return 0; - } - - build(*argv); -} diff --git a/doc/html/gmqcc.png b/doc/html/gmqcc.png deleted file mode 100644 index 0d9b79fb691074cf60e8598cdc20a69e3a4134f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2399 zcmZWrc{mh$7yenYW+}@gMwBh);zqVy%UGJZOv8}1#9YiRgeY5>vL!S(L}i&qA((7ybcJ*tAXs9ks{4 z^EAMrf(#^JmWvD7j6Be<+RiMn&>?#)?I?M(6BB}oZv%>M!}*{SQko%?-iV@3VP>+b>Ht$AmG~9rb#ChM(TTJ^ zgF65}I*0yy2G>|Fzl|(p@6DerJVzD5+ePNNo3x@SDF{k8RJ-G`091m;e!v=IG* zUu3VaMsv*m{0EodV|TZdPcZWvX zR)s=KbfaB^!or40)zt|FJKBNa;TP`Z=FS~He0a>EPb}<$`)aB+3-D zJm!6)y80X>-zW#+t|=?#&N4AEX_8hkQ>#~ysJ$CQ7n;U=C@e2$nKK6a`DR+Z12}k1uq1xp%|RRhL*;h!YT~ zc`va3bxQeEC^>whUjC_`{n5L>yJ~A!LKX*0l=p|MC&a~7^+KUgrxhz1R&NXh0_l2o zwz@($DzBR3!5Hl6`3w&Y4V6eFnuIaVzWJj|#Z+HkUuE?;XEsOza4fLWUanJ=jQ(U4 z6d0kY`EG4YCeyHN9M60m@4DHZiOf>`#b=RI`#+-Wx3t-|?B;oHDD^Qgt^P*7 zX@K{1<_vw?-5wNdunz5W$0g?7+#0S9iN7j_Mj|uYii&)Vp#Br}LEHR?t*R?Lr?OwA z43iiwQI&F7-e)}C#=O_${ko7xm9x*Dv&bukr<hLFWTS9&PEaLu831Ev|E7|JA{yxd$tldzdRN2)`X#Y-UI<2RyrA%k zu8(!d7`fUG;BzK zu19>EphDq}GJdm)T6dqE*qkcI95>L`))tg_x~1WEEMNC^u|dXF99F7Rn;ORpRtif= zC0~;9^BmzdhD|Ewe7W}5b)mIgJI|Y!fSR_A*U^lSXz}>vGT~@Hsn$6TN4dDTcxjEO zpH}zGtw@MWIH^Cj&^&HUb~CM*7aiE=W3JF0Z{=BHXeJ5c9|n&Ydp3+CFAqxqFCoOJ zcna^vAb$1QF;w=K$g-}3$Tj7wnUE{{LiXXujS5v$Y??-H7}CgLs88qm?S^n{d${M zNTDW~{uxD%w4QuynA%ThR?U0fsxa8n=S$9(;Vl_>=?+0{DtFo6;T23*)A4HCo`=Z40#C~X)>h@aLoD;g0 zxO_X&ubk4fV%r6!m1$|(PRt0rw^AwRI;InIG;ke7w`4X-)I`DmbccqB|B2z52METd zdV`-bKZG2MclU~R3lENt3AhpjKrBNN(ciB(#EX)0)iD|~8Z|Noz>qCGup^n^@H4a^ M9nRR-!2NIj2j+`qEdT%j diff --git a/doc/html/style.css b/doc/html/style.css deleted file mode 100644 index fa67901..0000000 --- a/doc/html/style.css +++ /dev/null @@ -1,92 +0,0 @@ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font: inherit; - vertical-align: baseline; -} - -body { - font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; - margin: 0; - line-height: 1.8em; - -webkit-font-smoothing: antialiased; - background: #CDC9C9; -} - -h1, h2, h3, h4, h5, h6 { - color:#232323; - margin:36px 0 10px; -} - -.head-ltitle, .head-rtitle, .head-vol { - font: bold 0.8em Arial, Helvectia, sans-serif; -} - -.head-vol { - visibility: hidden; -} - -.name { - font: bold 0.8em Monospace, serif; -} - -.ftype { - font: normal 1em Monospace, serif; -} - -h1 { - color: #c30000; - margin-top: 0.3em; - margin-bottom: 0.3em; - line-height: 1.3; - font: normal 1.4em Arvo, Monaco, sans-serif; - /*font: bold 1.4em Arial, Helvetica, sans-serif*/ -} - -.section { - margin-bottom: 1em; - margin-top: 1em; - padding-left: 1em; - border-top: 1px #cccccc solid; - font: normal 0.9em Arial, Helvetica, sans-serif; - text-align: justify; - border: 0; - padding-bottom: 1em; - border-bottom: 1px solid #f0e0e0; -} - -.list-tag { - padding-left: 1em; -} - -pre { - border: 1px dashed #ffffff; - background: #ddd8d8; -} - -.flag { - font: normal 1em Monospace, serif; -} - -a { - color:#C30000; - font-weight:200; - text-decoration:none; -} - -a:hover { - text-decoration: underline; -} diff --git a/doc/specification.tex b/doc/specification.tex deleted file mode 100644 index 74190fc..0000000 --- a/doc/specification.tex +++ /dev/null @@ -1,759 +0,0 @@ -\documentclass{article} - -%%% PACKAGES -\usepackage{geometry} -\usepackage[utf8]{inputenc} -\usepackage[parfill]{parskip} -\usepackage{subfig} -\usepackage{listings} -\usepackage{color} -\usepackage{sectsty} - -%%% GEOMETRY FOR DOCUMENT -\geometry{a4paper} - -%%% HEADERS/FOOTERS APPEARANCE -\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry -\pagestyle{fancy} % options: empty , plain , fancy -\renewcommand{\headrulewidth}{0pt} % customise the layout... -\lhead{}\chead{}\rhead{} -\lfoot{}\cfoot{\thepage}\rfoot{} - -%%% SECTION TITLE APPEARANCE -\allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help) - -%%% ToC APPEARANCE -\usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC -\usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents -\renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape} -\renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold! - -%%% listing language definitions -%%% BNF for now, QuakeC will be later -\definecolor{keyword1}{RGB}{0,102,153} -\definecolor{keyword2}{RGB}{0,153,102} -\definecolor{keyword3}{RGB}{0,153,255} -\definecolor{comment}{RGB}{204,0,0} -\definecolor{function}{RGB}{153,102,255} -\definecolor{digit}{RGB}{255,0,0} -\definecolor{string}{RGB}{255,0,204} -\definecolor{rule}{RGB}{192,192,192} -\definecolor{back}{RGB}{250,250,250} - -\lstdefinelanguage{bnf}{ - keywordstyle={\color{keyword2}\bfseries}, - keywords={}, - otherkeywords={::=,|}, - morecomment=[s][\color{comment}]{(*}{*)}, - stringstyle=\color{string}, - showstringspaces=false, - frame=none, - rulecolor=\color{rule}, - backgroundcolor=\color{back} -} - -%% Title Information %% -\title{The GMQCC QuakeC Programming Language} -\author{Dale Weiler} -\date{\today} - -\begin{document} - -%% Title Page %% -\maketitle -\thispagestyle{empty} -\raggedright -\abstract -This document specifies the form and establishes the interpretation of programs written in -the GMQCC QuakeC programming language variant (refereed simply as QuakeC throughout this -document). It specifies: -\begin{itemize} - \item the representation of QuakeC programs; - \item the syntax and constraints of the QuakeC language; - \item the semantic rules for interpreting QuakeC programs; - \item the representation of input data to be processed by QuakeC programs; - \item the representation of output data produced by QuakeC programs; - \item the restrictions and limits imposed by a conforming implementation of QuakeC. -\end{itemize} -This document does not specify -\begin{itemize} - \item the mechanism by which QuakeC programs are transformed for use by a data- - processing system; - \item the mechanism by which QuakeC programs are invoked for use by a data-processing - system; - \item the mechanism by which input data are transformed for use by a QuakeC program; - \item the size or complexity of a program and its data that will exceed the capacity - of any specific data-processing system or the capacity of a particular - execution environment; - \item all minimal requirements of a data-processing system that is capable of - supporting a conforming implementation. -\end{itemize} - -%% Table Of Contents %% -\newpage -\thispagestyle{empty} -\tableofcontents -\newpage - -%% Begin Contents %% -\raggedright % No weird TEX spacing on lines to fill page - -%% -> Terms, definitions, and symbols %% -\section{Terms, definitions, and symbols} -\subsection*{argument} -Expression in the comma-separated list bounded by the parentheses in a function call -expression, or a sequence of preprocessing tokens in the comma-separated list bounded -by the parentheses in a function-like macro invocation. - -\subsection*{behavior} -External appearance or action - -\subsection*{implementation-defined behavior} -Unspecified behavior where each implementation documents how the choice is made. - -\subsection*{undefined behavior} -Behavior, upon use of a non-portable or erroneous program construct or of erroneous data, -for which this document imposes no actual requirements. - -\subsection*{unspecified behavior} -Use of an unspecified value, or other behavior where this document provides two or more -possibilities and imposes no further requirements on which is chosen in any instance. - -\subsection*{constraint} -Restriction, either syntactic or semantic, by which the exposition of language elements -is to be interpreted. - -\subsection*{diagnostic message} -Message belonging to an implementation-defined subset of the implementation's message -output. - -\subsection*{object} -Region of data storage in the execution environment, the contents of which can represent -values. - -\subsection*{parameter} -Object declared as part of a function declaration or definition that acquires a value on -entry to the function, or an identifier from the comma-separated list bounded by the -parentheses immediately following the macro name in a function-like macro definition. - -\subsection*{recommended practice} -Specification that is strongly recommended as being in keeping with the intent of this -document, but that may be impractical for some implementations. - -\subsection*{value} -Precise meaning of the contents of an object when interpreted as having a specific type. - -\subsection*{implementation} -Particular set of software, running in a particular translation environment under -particular control options, that performs translation of programs for, and supports -execution of functions in, a particular execution environment. - -\subsection*{implementation-defined value} -Unspecified value where each implementation documents how the choice is made. - -\subsection*{unspecified value} -Valid value of the relevant type where this document imposes no requirements on which -value is chosen in any instance. - -%% -> Conformance %% -\section{Conformance} -In this document, "shall" is to be interpreted as a requirement on an implementation -or on a program; conversely, "shall not" is to be interpreted as a prohibition. \\ -If a "shall" or "shall not" requirement that appears outside of a constraint is violated, -the behavior is undefined. Undefined behavior is otherwise indicated in this document by -the words "undefined behavior" or by the omission of any explicit definition of behavior. -There is no difference in emphasis among these three; they all describe "behavior that is -undefined". - -%% -> Enviroment %% -\section{Environment} -An implementation that translates QuakeC source files and executes QuakeC programs in two -data processing-system environments, which will be called the translation environment and -the execution environment in this document. Their characteristics define and constrain the -results of executing QuakeC programs constructed according to the syntactic and semantic -rules for conforming implementations. -\subsection{Conceptual models} -\subsubsection{Translation environment} -\paragraph*{Translation steps} -The precedence among the syntax rules of translation is specified by the following steps -\begin{enumerate} - \item Physical source file characters are mapped, in an implementation-defined manner, - to the source character set (introducing new-line characters for end-of-line - indicators) if necessary. Trigraph and digraph sequences are replaced by their - corresponding single-character internal representations. - \item The source file is decomposed into preprocessing tokens and sequences of white- - space characters (including comments). A source file shall not end in a partial - preprocessing token or in a partial comment. Each comment is replaced by one - space character. New-line characters are retained. Whether each nonempty - sequences of white-space characters other than new-line is retained or replaced - by one space character is implementation-defined. - \item Preprocessing directives are executed, macro invocations are expanded - recursively. A \#include preprocessing directive causes the named header or - source file to be processed from step one through step three, recursively. All - preprocessing directives are then deleted. - \item Each source character set member and escape sequence in character constants and - string literals is converted to the corresponding member of the execution - character set; if there is no corresponding member, it is converted to an - implementation-defined member other than the null character. - \item Adjacent string literal tokens are concatenated. - \item White-space characters seperating tokens are no longer significant. Each - preprocessing token is converted into a token. The resulting tokens are then - syntactically and semantically analyzed and translated. -\end{enumerate} -\subparagraph*{Footnotes} -Implementations shall behave as if these steps occur separately, even though many are likely -to be folded together in practice. Source files need not be stored as file, nor need there -be any one-to-one correspondence between these items and any external representation. The -description is conceptual only, and does not specify any particular implementation. - -\paragraph*{Diagnostics} -A conforming implementation shall produce at least on diagnostic message(identified in an -implementation-defined manner) if a source file contains a violation of any syntax rule or -constraint, even if the behavior is also explicitly specified as undefined or -implementation-defined. Diagnostic messages need not be produced in other circumstances. - -%% ->-> Execution environments %% -\subsubsection{Execution environment} -A conforming execution environment shall provide at minimal the following 15 definitions -for built in functions, with an accompanying header or source file that defines them. -\begin{enumerate} - \item entity () spawn - \item void (entity) remove - - \item string (float) ftos - \item string (vector) vtos - \item string (entity) etos - \item float (string) stof - - \item void (string, ...) dprint - \item void (entity) eprint - - \item float (float) rint - \item float (float) floor - \item float (float) ceil - \item float (float) fabs - \item float (float) sin - \item float (float) cos - \item float (float) sqrt -\end{enumerate} -The numbers of which these built-ins are assigned is implementation-defined; -an implementation is allowed to use these built-ins however it sees fit. - -\pagebreak -%% -> Language %% -\section{Language} -\subsection{Notation} -The syntax notation used in this document is that of a BNF specification. A set of -derivation rules, often written as: -\begin{lstlisting}[language=bnf] - symbol ::= expression -\end{lstlisting} -Where symbol is a nonterminal, and the expression consists of one or more sequences of -symbols; more sequences are separated by a vertical bar \textbar, indicating a choice, -the whole being a possible substitution for the symbol on the left. Symbols that never -appear on the left side are terminals. -\linebreak - -This document defines language syntax throughout it's way at defining language -constructs If you're interested in a summary of the language syntax, one is given in -annex A. - -%% -> Concepts %% -\subsection{Concepts} -%% ->-> Scopes of identifiers %% -\subsubsection{Scopes of identifiers} -An identifier can denote an object; a function, or enumeration; a label name; a macro -name; or a macro parameter. The same identifier can denote different items at different -points in the program. A member of an enumeration is called an enumeration constant. -Macro names and macro parameters are not considered further here, because prior to the -semantic phase of program translation any occurrences of macro names in the source file -are replaced by the preprocessing token sequences that constitute their macro definitions. -\linebreak - -For each different item that an identifier designates, the identifier is visible (i.e, -can be used) only within a region of program text called its scope. Different items -designated by the same identifier either have different scopes, or are in different name -spaces. There are four kinds of scopes: function, file, block and function prototype. -(A function prototype is a declaration of a function that declares the types of its -parameters.) -\linebreak - -A label name is the only kind of identifier that has function scope. It can be used (in -a goto statement) anywhere in the function in which it appears, and is declared -implicitly by its syntactic appearance (prefixed by a colon :, and suffixed with a -statement). -\linebreak - -Every other identifier has scope determined by the placement of its declaration (in a -declarator or type specifier). If the declarator or type specifier that declares the -identifier appears outside any block or list of parameters, the identifier has file -scope, which terminates at the end of the file. If the declartor or type specifier that -declares the identifier appears inside a block or within the list of parameter -declarations in a function definition, the identifier has block scope, which terminates -at the end of the associated block. If the declarator or type specifier that declares -the identifier appears within the list of parameter declarations in a function prototype -(not part of a function definition), the identifier has function prototype scope, which -terminates at the end of the function declarator. If an identifier designates two -different items in the same name space, the scopes might overlap. If so, the scope of -one item (the inner scope) will be a strict subset of the scope of the other item (the -outer scope). Within the inner scope, the identifier designates the item declared in the -inner scope; the item declared in the outer scope is hidden (and not visible) within -the inner scope. -\linebreak - -Unless explicitly stated otherwise, where this document uses the term "identifier" to -refer to some item (as opposed to the syntactic construct), it refers to the item in the -relevant name space whose declaration is visible at the point the identifier occurs. -\linebreak - -Two identifiers have the same scope if and only if their scopes terminate at the same -point. -\linebreak - -Each enumeration constant has scope that begins just after the appearance of its defining -enumerator in an enumerator list. Any other identifier has scope that begins just after -the completion of its declarator. - -%% ->-> Name spaces of identifiers %% -\subsubsection{Name spaces of identifiers} -If more than one declaration of a particular identifier is visible at any point in a -source file, the syntactic context disambiguates uses that refer to different items. -Thus, there are separate name spaces for various categories of identifiers, as follows: -\linebreak -\begin{itemize} - \item Label names (disambiguated by the syntax of the label declaration and use); - \item Enumerations (disambiguated by following the keyword enum); - \item All other identifiers, called ordinary identifiers (declared in ordinary - declarators or as enumeration constants). -\end{itemize} - -%% ->-> Types %% -\subsubsection{Types} -The meaning of a value stored in an object returned by a function is determined by the -type of the expression used to access it. (An identifier declared to be an object is the simplest -such expression; the type is specified in the declaration of the identifier.) Types are -partitioned into object types (types that fully describe objects), function types(types -that describe functions), and incomplete types(types that describe objects but lack -information). -\linebreak - -An object declared type bool is large enough to store the values 0 and 1. -\linebreak - -An object declared type float is a real type; An object declared type vector is a -comprised set of three floats that respectively represent the \underline{x,y,z} -components of a three-dimensional vector. -\linebreak - -An enumeration comprises a set of named integer constant values. Each distinct -enumeration constitutes a different enumerated type. -\linebreak - -Enumeration types and float are collectively called arithmetic types. Each arithmetic -type belongs to one type domain. -\linebreak - -The void type comprises an empty set of values; it is an incomplete type that cannot be -completed. -\linebreak - -A number of derived types can be constructed from the object, function and incomplete -types, as follows: -\linebreak - -\begin{itemize} - \item An array type describes a contiguously allocated nonempty set of objects with a - particular object type, called the element type. Array types are characterized - by their element type and by the number of elements in the array. An array type - is said to be derived from its element type, and if its element is type T, the - array type is sometimes called "array of T". The construction of an array type - from an element type is called "array type derivation". - \item A function type describes a function with a specified return type. A function - type is characterized by its return type and the number and types of its - parameters. A function type is said to be derived from its return type, and if - its return type is T, the function type is sometimes called "function returning - T". The construction of a function type from a return type is called "function - type derivation". -\end{itemize} - -Arithmetic types are collectively called scalar types. Arrays and vectors are -collectively called aggregate types. -\linebreak - -An array of unknown size is an incomplete type. It is completed, for an identifier of -that type, by specifying the size in a later declaration. Arrays are required to have -known constant size. -\linebreak - -A type is characterized by its type category, which is either the outermost derivation -of a derived type (as noted above in the construction of derived types), or the type -itself if the type consists of no derived types. -\linebreak - -Any type so far mentioned is an unqualified type. Each unqualified type has several -qualified versions of its type, corresponding to the combinations of one, two, or all -two of const and volatile qualifiers. The qualified or unqualified versions of a type -are distinct types that belong to the same type category and have the same representation. -A derived type is not qualified by the qualifiers (if any) of the type from which it -is derived. -\linebreak - -%% ->-> Compatible types and composite type %% -\subsubsection{Compatible types and composite type} -Two types have compatible type if their types are the same. -\linebreak - -All declarations that refer to the same object or function shall have compatible type; -otherwise the behavior is undefined. -\linebreak - -A composite type can be constructed from two types that are compatible; it is a type that -is compatible with both of the two types and satisfies the following conditions: -\begin{itemize} - \item If one type is an array, the composite type is an array of that size. - \item If only one type is a function type with a parameter type list(a function - prototype), the composite type is a function prototype with the parameter type - list. - \item If both types are function types with parameter type lists, the type of each - parameter in the composite parameter type list is the composite type of the - corresponding parameters. -\end{itemize} -These rules apply recursively to types from which the two types are derived. -\linebreak - -%% ->Conversions %% -\subsection{Conversions} -Several operators convert operand values from one type to another automatically. This -sub-clause specifies the result required from such an implicit conversion. -\linebreak - -Conversion from an operand value to a compatible type causes no change to the value or -the representation. -\linebreak - -TODO: Specify all implicit conversions. - -%% ->->Aritmetic operands %% -\subsubsection{Arithmetic operands} -\paragraph*{Boolean type} -When any scalar value is converted to bool, the result is 0 if the value compares equal -to 0; otherwise the result is 1. - -%% ->->Other operands %% -\subsubsection{Other operands} -\paragraph{Lvalues, arrays and function designators} -An lvalue is an expression with an object type or an incomplete type other than void; -if an lvalue does not designate an object when it is evaluated, the behavior is undefined. -When an object is said to have a particular type, the type is specified by the lvalue -used to designate the object. A modifiable lvalue is an lvalue that does not have an -array type, does not have an incomplete type, and does not have a const-qualified type. -\linebreak - -Except when it is the operand of the unary \& operator, the ++ operator, the -- operator, -or the left operand of the . operator or an assignment operator, an lvalue that does not -have array type is converted to the value stored in the designated object (and is no -longer an lvalue). If the lvalue has qualified type, the value has the unqualified -version of the type of the lvalue; otherwise, the value has the type of the lvalue. If -the lvalue has an incomplete type and does not have array type, the behavior is undefined. -\linebreak - -A function designator is an expression that has function type. - -\paragraph*{void} -The (nonexistent) value of a void expression (an expression that has type void) shall not -be used in any way, and implicit conversions (except to void) shall not be applied to -such an expression. If an expression of any other type is evaluated as a void expression, -its value or designator is discarded. (A void expression is only evaluated for its -side effects.) -\pagebreak - -\subsection{Lexical elements} -\paragraph*{Syntax} -\begin{lstlisting}[language=bnf] -token ::= keyword - | identifier - | constant - | string-literal - | punctuator -preprocessing-token ::= header-name - | identifier - | pp-number - | string-literal - | punctuator -\end{lstlisting} -\paragraph*{Constraints} -Each preprocessing token that is converted to a token shall have the lexical form of a -keyword, an identifier, a constant, a string literal, or a punctuator. - -\paragraph*{Semantics} -A token is the minimal lexical element of the language in translation steps six and seven. -The categories of tokens are: keywords, identifiers, constants, string literals, and -punctuators. A preprocessing token is the minimal lexical element of the language in -translation steps three through five. The categories of preprocessing tokens are: header -names, identifiers, preprocessing numbers, string literals, punctuators and other single -non-white-space characters that do not lexically match the other preprocessing token -categories. If a ' or a " character matches the last category, the behavior is undefined. -Preprocessing tokens can be separated by white space; this consists of comments (described -later), or white-space characters (space, horizontal tab, new-line, vertical tab, and form --feed), or both. In certain circumstances during translation step four, white space (or -the absence thereof) serves as more than preprocessing token separation. White space may -appear within a preprocessing token only as part of a header name or between the quotation -characters in a string literal. -\linebreak - -If the input stream has been parsed into preprocessing tokens up to a given character, the -next preprocessing token is the longest sequence of characters that could constitute a -preprocessing token. There is one exception to this rule: header name preprocessing tokens -are recognized only within \#include preprocessing directives and in implementation-defined -locations within \#pragma directives. In such contexts, a sequence of characters that -could be either a header name or string literal is recognized as the former. - -%% ->-> Keywords %% -\subsubsection{Keywords} -\paragraph*{Syntax} -\begin{lstlisting}[language=bnf] -keyword ::= enum | break | return | void - | case | float | volatile | for - | while | const | goto | bool - | continue | if | static | default - | inline | do | switch | else - | vector | entity -\end{lstlisting} -\paragraph*{Semantics} -The above tokens (case sensitive) are reserved (in translation step seven and eight) for -use as keywords, and shall not be used otherwise. - -%% ->->Identifiers %% -\subsubsection{Identifiers} -\begin{lstlisting}[language=bnf] -identifier ::= nondigit - | identifier nondigit - | identifier digit - -nondigit ::= _ | a | b | c | d | e | f | g | h | i - | j | k | l | m | n | o | p | q | r | s - | t | u | v | w | x | y | z | A | B | C - | D | E | F | G | H | I | J | K | L | M - | N | P | Q | R | S | T | U | V | W | X - | Y | Z - -digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 -\end{lstlisting} -\paragraph*{Semantics} -An identifier is a sequence of nondigit characters (including the underscore \_, the lower -case and upper case Latin letters, and other characters) and digits, which designates one -or more items. Lowercase and uppercase letters are distinct. There is a specific limit of -65535 characters for an identifier. -\linebreak - -When preprocessing tokens are converted to tokens during translation step six, if a -preprocessing token could not be converted to either a keyword or an identifier, it is -converted to a keyword. - -\paragraph*{Predefined identifiers} -Any identifiers that begin with the prefix \_\_builtin, or are within the reserved name -space are reserved by the implementation. - -%% ->->Constants %% -\subsubsection{Constants} -\begin{lstlisting}[language=bnf] -constant ::= integer-constant - | floating-constant - | enumeration-constant - | character-constant - | vector-constant - -integer-constant ::= decimal-constant - | octal-constant - | hexadecimal-constant - -decimal-constant ::= nonzero-digit - | decimal-constant digit - -octal-constant ::= 0 - | octal-constant octal-digit - -hexadecimal-constant ::= hexdecimal-prefix - hexadecimal-digit - | hexadecimal-digit - hexadecimal-constant - -hexadecimal-prefix: ::= 0x | 0X - -nonzero-digit ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - | 9 - -octal-digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 - -hexadecimal-digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 - | 8 | 9 | a | b | c | d | e | f - | A | B | C | D | E | F -\end{lstlisting} - -%% ->-> String literals %% -\subsubsection{String literals} -\begin{lstlisting}[language=bnf] -string-literal := " s-char-sequence " - -s-char-sequence := s-char - | s-char-sequence s-char - -s-char := ` | ! | @ | # | $ | % | ^ | & | * - | ( | ) | _ | - | + | = | { | } | [ - | ] | | | : | ; | ' | < | , | > | . - | ? | / | 1 | 2 | 3 | 4 | 5 | 6 | 7 - | 8 | 9 | 0 | q | w | e | r | t | y - | u | i | o | p | a | s | d | f | g - | h | j | k | l | z | x | c | v | b - | n | m | Q | W | E | R | T | Y | U - | I | O | P | A | S | D | F | G | | - | H | J | K | L | Z | X | C | V | B - | N | M -\end{lstlisting} -\paragraph*{Description} -A character string literal is a sequence of zero or more characters enclosed in -double-quotes, as in "xyz". -\linebreak - -The same considerations apply to each element of the sequence in a character string -literal as if it where an integer character constant, except that the single-quote -' is representable either by itself or by the escape sequence \textbackslash', but -the double-quote " shall be represented by the escape sequence \textbackslash". - -\paragraph*{Semantics} -In translation stage six, the character sequences specified by any sequence of adjacent -character string literal tokens are concatenated into a single character sequence. - -%% ->-> Punctuators %% -\subsubsection{Punctuators} -TODO: BNF - -A punctuator is a symbol that has independent syntactic and semantic significance. -Depending on context, it may specify an operation to be performed (which in turn -may yield a value or a function designator, produce a side effect, or some combination -thereof) in which case it is known as an operator (other forms of operator also exist -in some contexts). An operand is an item on which an operator acts. -\linebreak - -TODO: Trigraphs \& Digraphs - -\subsubsection{Header names} -TODO -\subsubsection{Preprocessing numbers} -TODO -\subsubsection{Comments} -Except within a character constant, a string literal, or a comment, the characters /* -introduce a comment. The contents of such a comment are examined only to identify -characters and to find the characters */ that terminate it. -\linebreak - -Except within a character constant, a string literal, or a comment, the characters // -introduce a comment that includes all characters up to, but not including, the next -new-line character. The contents of such a comment are examined only to identify -characters and to find the terminating new-line character. -\linebreak - -%% -> Expressions %% -\subsection{Expressions} -An expression is a sequence of operators and operands that specifies computation of a -value, or that designates an object or function, or that generates side effects, or that -performs a combination thereof. -\linebreak - -Between the previous and next sequence point an object shall have its stored value -modified at most once by the evaluation of an expression. Furthermore, the prior value -shall be read only to determine the value to be stored. -\linebreak - -The grouping of operators and operands is indicated by the syntax. Except as specified -later (for the function call (), \&\&, \textbar\textbar ?:, and comma operators), the -order of evaluation of sub-expressions and the order in which side effects take place -are both unspecified. -\linebreak - -Some operators (the unary \textasciitilde operator, and the binary operators \textless -\textless, \textgreater\textgreater, \&, \^, and \textbar, collectively describe bitwise -operators) are required to have operands that are either integer, or floating point with -zero points of decimal precision. -\linebreak - -If an exceptional condition occurs during the evaluation of an expression (that is, if -the result is not mathematically defined or not in the range or representable values for -its type), the behavior is undefined. - -%% ->-> Primary expressions %% -\subsubsection{Primary expressions} -\paragraph*{Syntax} -\begin{lstlisting}[language=bnf] -primary-expression ::= identifier - | constant - | string-literal - ( expression ) -\end{lstlisting} -\paragraph*{Semantics} -An identifier is a primary expression, provided it has been declared as designating an -object(in which case it is an lvalue) or a function(in which case it is a function -designator). -\linebreak - -A constant is a primary expression. Its type depends on its form and value. -\linebreak - -A string literal is a primary expression. It is an lvalue. -\linebreak - -A parenthesized expression is a primary expression. Its type and value identical to -those of the unparenthesized expression. It is an lvalue, a function designator, or a -void expression if the unparenthesized expression is, respectively, an lvalue, a -function designator, or a void expression. - -%% ->-> Constant expressions %% -\subsubsection{Constant expressions} -\paragraph*{Syntax} -\begin{lstlisting}[language=bnf] -constant-expression ::= conditional-expression -\end{lstlisting} -\paragraph*{Description} -A constant expression can be evaluated during translation rather than runtime, and -accordingly may be used in any place that a constant may be. -\paragraph*{Constraints} -\begin{itemize} - \item Constant expressions shall not contain assignment, increment, decrement, - function-call, or comma operators, except when contained within a subexpression - that is not evaluated. - \item Each constant expression shall evaluate to a constant that is in range of - representable values for its type. -\end{itemize} -\paragraph*{Semantics} -An expression that evaluates to a constant is required in several contexts. If a floating -point expression is evaluated in the translation environment, the arithmetic precision range -shall be as great is if the expression were being evaluated in the execution environment. -\linebreak - -An integer constant expression shall have integer type and shall only have operands that -are integer constants, enumeration constants, character constants, and floating constants -that are the immediate operand of casts. Cast operators in an integer constant expression -shall only convert arithmetic types to integer types. -\linebreak - -More latitude is permitted for constant expressions in initializers. Such a constant expression -shall be, or evaluate to an arithmetic constant expression. -\linebreak - -An arithmetic constant expression shall have arithmetic type and shall only have operands that -are integer constants, floating constants, enumeration constants, and character constants. Cast -operators in an arithmetic constant expression shall only convert arithmetic types to arithmetic -types. -\linebreak - -An implementation may accept other forms of constant expressions. -\linebreak - -The semantic rules for the evaluation of a constant expression are the same as for nonconstant -expressions. - - -\bibliographystyle{abbrv} -\bibliography{main} - -\end{document} diff --git a/syntax/README b/syntax/README deleted file mode 100644 index 5a5c4b4..0000000 --- a/syntax/README +++ /dev/null @@ -1,24 +0,0 @@ -Here exists some syntax highlighting configuration files for various -text editors. Inside each directory exists some documentaiton on how -you can install the configuration file correctly. - -Currently the supported text editors: - geany - kate - kwrite - uses kate syntax highlighting - kdevelop - uses kate syntax highlighting - QtCreator - supports kate syntax highlighting - gtksourceview - main source viewer in GNOME - gedit - uses gtksourceview - sandy - uses gtksourceview - nano - jedit - - -Other text editors we plan to provide syntax highlighting configuration -files for (but never got around to figuring out) - vim - emacs - -If your text editor is not supported and you'd like to create syntax -highlighting support for it, don't hesitate to share it with us. diff --git a/syntax/geany/README b/syntax/geany/README deleted file mode 100644 index c527d3f..0000000 --- a/syntax/geany/README +++ /dev/null @@ -1,8 +0,0 @@ -To use the geany syntax highlighting install filetypes.qc to the syntax -directory for geany. - -# Can be installed globally to -/usr/share/geany/ - -# Can be installed locally to -~/.config/geany/filedefs/ diff --git a/syntax/geany/filetypes.qc b/syntax/geany/filetypes.qc deleted file mode 100644 index d84bb7e..0000000 --- a/syntax/geany/filetypes.qc +++ /dev/null @@ -1,55 +0,0 @@ -[styling] -default=default -comment=comment -commentline=comment_line -commentdoc=comment_doc -preprocessorcomment=comment -number=number_1 -word=keyword_1 -word2=keyword_2 -string=string_1 -stringraw=string_2 -character=character -uuid=other -preprocessor=preprocessor -operator=operator -identifier=identifier_1 -stringeol=string_eol -verbatim=string_2 -regex=regex -commentlinedoc=comment_line_doc -commentdockeyword=comment_doc_keyword -commentdockeyworderror=comment_doc_keyword_error -globalclass=class -tripleverbatim=string_2 -hashquotedstring=string_2 - -[keywords] -primary=break case const continue string default do else enum float for goto if return switch typedef void while false nil true -secondary= -docComment= - -[lexer_properties] -styling.within.preprocessor=1 -lexer.cpp.track.preprocessor=0 -preprocessor.symbol.$(file.patterns.cpp)=# -preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef -preprocessor.middle.$(file.patterns.cpp)=else elif -preprocessor.end.$(file.patterns.cpp)=endif - -[settings] -extension=qc -comment_single=// -comment_open=/* -comment_close=*/ -comment_use_indent=true -context_action_cmd= - -[indentation] -width=4 -type=0 - -[build_settings] -compiler=gmqcc -Wall "%f" -o "%e" -linker= -run_cmd=qcvm "./%e" diff --git a/syntax/gtksourceview/README b/syntax/gtksourceview/README deleted file mode 100644 index 73a6072..0000000 --- a/syntax/gtksourceview/README +++ /dev/null @@ -1,5 +0,0 @@ -To use the gtksourceview syntax highlighting install qc.lang to the syntax -directory for gtksourceview - -# Can be installed globally to -/usr/share/gtksourceview-[version]/language-specs/ diff --git a/syntax/gtksourceview/qc.lang b/syntax/gtksourceview/qc.lang deleted file mode 100644 index 827290f..0000000 --- a/syntax/gtksourceview/qc.lang +++ /dev/null @@ -1,173 +0,0 @@ - - - - *.qc - // - /* - */ - - - -