Licensing and Use Instructions
Copyright (C) 2018, Buffnstaff Software and Services Private Limited. All Rights Reserved.
Licensing and Use instructions are also printed in MacroMagic_Use.html when you run the software, with more details at www.buffnstaff.com
LICENSING INSTRUCTIONS:
Copyright (C) 2018, Buffnstaff Software and Services Private Limited. All Rights Reserved, including, as per India Copyright Registration number SW-9894/2017.
Welcome to the Macro Magic (R) C/C++ Preprocessor/Compiler V1.1 Beta of Buffnstaff Software And Services Private Limited, www.buffnstaff.com, hereafter referred
to as Buffnstaff or BNS(R). This preprocessor/compiler carries out 7.1 phases of C/C++ compilation, up to tokenization of a program.
Instructions for licensing and using this software are as follows:
Unzip MacroMagic.zip. Save the executable (.exe) files in a folder that you intend to be the installation destination of the software. Macro Magic will run in a limited
demonstration mode till you make a purchase by clicking run to generate purchase_form.txt.
BY RUNNING THIS SOFTWARE BY CLICKING RUN, FOR DEMONSTRATION MODE USE OR PURCHASE, YOU ARE AGREEING TO THE BUFFNSTAFF LICENSE TERMS
GIVEN BELOW. If you disagree, kindly exit now.
The Buffnstaff Single-User Software License(Macro Magic V1.1. Beta, Release Date 22 July 2018)
This license allows you to use this Buffnstaff copyrighted and patent pending software by installing it on one computer in either a free, demonstration mode, or a
purchased full-function mode. This license permits use of the software on the one computer as per the instructions of use of the software. The software may not be
used in any other way or be analyzed, altered, reverse engineered, dissected, or bundled for any purpose. The software is only licensed to you for non-exclusive,
non-transferrable use and is not sold to you, with ownership and all rights remaining vested in Buffnstaff Software and Services Private Limited. In particular,
you are not granted any rights over Buffnstaff's trademarks including Macro Magic or BNS by this license. The software may not be further sub-licensed or transferred
or rented or sold by you to any party. Thus the software cannot be run on a server by you for users other than yourself. The software queries its environment and
reads or writes html files for enforcing its licensed use. You are required to to permit this enforcement without monitoring or interfering with it in any way such
as moving, deleting or altering the files or blocking such access. The software may be transferred once from one computer installation to another as described below.
This Macro Magic version 1.1 C/C++ preprocessor/compiler is warranteed to work accurately on a Windows 10 personal computer. Each (first) defect identification will be
awarded US$100 (hundred) by BNS. Only the first defect identified for a fix will be awarded, so the liability is limited and duplicate defect identifications later will
not be awarded. Due to the confidentiality of a fix for a defect, Buffnstaff will be the sole arbiter in deciding whether a defect identification is indeed a defect and
whether it is the first identification leading to a fix. This warranty is a lifetime warranty, applicable as long as Macro Magic C/C++ Preprocessor/Compiler V1.1 is
offerred independently by Buffnstaff. This is the only warranty offered by Buffnstaff for the Macro Magic C/C++ preprocessor and there is no other warranty for the
software, express or implied. Non exercise of any power, right, or remedy resulting from a breach of this license is not to be construed as a waiver thereof, the first
time or any time it occurs. This license represents the entire agreement for your use of this software. This license is governed by the laws of India and any claim or
dispute resolution is to be carried out exclusively under the jurisdiction of the courts of New Delhi or Haryana. If a provision of this license is judged by an applicable
court as illegal, void, or otherwise unenforceable, then that provision is to be severed from the remaining license, which will continue to be in force.
Copyright 2018, Buffnstaff Software and Services Private Limited. All rights reserved.
This software and associated files and documentation comprise copyrighted and patent pending works of Buffnstaff Software and Services Private Limited (Indian patent
applications 1025/DEL/2014, 1753/DEL/2015, US patent applications US14/928851, US2015/0293752A1). Macro Magic and BNS are registered trademarks of
Buffnstaff Software and Services Private Limited by Indian trademark numbers 2774535 and 2279424 respectively.
FOR OBTAINING THE FULL FUNCTION, PURCHASE MACRO MAGIC AS FOLLOWS. Delete any purchase_form.txt file in the Macro Magic folder and then run Macro Magic
(click run) that will then generate a fresh, unfilled purchase_form.txt for you, using which you can order paid Macro Magic by filling the purchase_form.txt and then
e-mailing a copy of it to licensing at buffnstaff dot com, along with making payment for the purchase as described at www.buffnstaff.com.
You will be e-mailed back a BNS_Paint.html file that you place in Macro Magic's folder for the full function Macro Magic. If you wish to un-install Macro Magic, simply
delete its folder for complete removal. To transfer Macro Magic to another computer, allowed once only, specify -t or -T as the first option in a conf.txt file and click run.
E-mail the generated BNS_Transfer.html file along with purchase_form.txt to licensing at buffnstaff.com for obtaining credit to install afresh free at the second computer.
If you like this preprocessor, pass along a copy of the executables or MacroMagic.zip to a friend. If you want this preprocessor under different licensing terms,
request for such a version by writing to ask at buffnstaff dot com.
You may wish to check that the software is authentic and runs well on your Windows computer by running it in the demonstration mode it allows prior to purchase.
Any messages from the preprocessor are printed in BNS_Log.txt.
INSTRUCTIONS FOR USE ARE AS FOLLOWS:
Click Run, after supplying a conf.txt file in Macro Magic's folder that specifies your selected options in a sequence of
space separated options followed by the name of the input file that is to be preprocessed. A valid conf.txt needs to be sized less
than 10000 bytes. The options are :
-c : requires a timed file copy of the top file F of the translation unit to F_copy.txt for comparing Macro Magic's speed.
-d : specifies the dialect to comply with, e.g. -dC99, -dC11, -dCpp98, -dCPP11. The default is CPP11.
-html : specifies that html files named after input files in the translation unit are to be generated illustrating
preprocessor translation steps comprising trigraph translation, join translation, comment translation,
pp tokenization, translation explanation of macros selected with -ppm option below, and conditional compilation explanation.
-Iinclude : include is a non-whitespace-containing path of a directory that will be searched for included user files, e.g. "foo.h"
-Sinclude : include is a non-whitespace-containing path of a directory that will be searched for included system files
-Msize : size is the heap memory in Kilobytes that the system works with. Default is 256 MB. Size must be between 32 MB and 1 GB
-pp : specifies that the preprocessor token stream is to be printed, matching source into inputfile suffixed by _pps.txt.
Overridden by -ppx, -ppm and Lens options below, all of which independently specify (stylized pretty) printing.
-ppmA : specifies that the preprocessor token stream is to be pretty printed with source or specified indentation (for -ppx option) and
explanation of all macros and conditional compilation into inputfile suffixed by _ppm.txt. An explanation for a macro invocation
comprises a comment succeeding the invocation. An explanation may comprise nested, numbered macro explanations
for nested macro invocations. $ marks the end of a macro explanation.
-ppmMacro : specifies that the preprocessor token stream is to be pretty printed with source or specified indentation
(for -ppx option) and explanation of Macro and conditional compilation into inputfile suffixed by _ppm.txt, as above.
-ppx : is the manual lens option that the preprocessor token stream is to be pretty printed with specified or
default indentation into inputfile suffixed by _ppx.txt or _ppm.txt (if macro explanation is specified)
-ppWxxx : is the lens option specifying page width as xxx characters. Overrides ppx option.
-ppLxxx : is the lens option specifying page looseness as xxx characters. Page_width must be specified first, with looseness defaulting to or
capped by page_width/4. An explicit looseness setting here can only select a non-zero value below this cap and not increase it.
-ppN : is the lens option demanding no breaks, or in other words, linearization, of scopes whenever possible.
-ppHyyy : is the lens option specifying page height as yyy characters. If unspecified, page height is not considered in pagination.
-ppFyyy : is the lens option specifying page footer as yyy characters. Default value is 0.
-ussLLLL : specifies that LLLL is a suffix of a user-defined literal type for C++11 use.
-write : specifies that the preprocessor token stream is to be made available in inputfile suffixed by _wri.txt (for pp tokens),
and _sym.txt (for symbol table comprising tokens).
-xa_number, where a is a decimal digit from 0 to 9 : specifies that the lexical scope a is to be indented to number position.
Overrides -xn option for the specified scopes. Indentations must be positive integers, capped at 999, and
increase monotonically only, inclusive of any xn option.
-xn_number : specifies that the indentation increment per lexical scope is number. The -xa option overridingly specifies
the scope for the first 10 scopes. Thereafter, any remaining scope's indentation is its surrounding scope's
indentation + number. Unspecified, or default xn is 3.
Examples of valid conf file specifications, one per line, are :
-html -ppmFoo input.c
-html -ppma input.cpp
-write input.c
-ppx -x0_3 -xn_5 input.c
In the above, the first conf requires html files generation with only macro Foo/conditional compilation explained everywhere. The second
requires all macros and conditional compilation to be explained. The third requires tokens for input.c to be output. The fourth requires pretty
printing such that the outermost scope start from the 3rd position and thereafter the increment per scope is 5 spaces. The confs can be used in
combination. Preprocessor messages are saved in one or more BNS_Log.txt, which are collected into one at the end and displayed
by Macro Magic using Microsoft Notepad. When you shut down Notepad, Macro Magic exits. If initially, a BNS_Log.txt cannot be
opened, then the system exits without a message. Any other system exit is explained in BNS_Log.txt by a message. Macro Magic fixes
user errors in code and bypasses translation limits in an effort to maximize the compiled code. This process fails only if Macro Magic runs
out of memory prematurely, in which case the system exits with such a message. In this rare case, re-run Macro Magic with a larger heap size.
The range of heap sizes permitted are designed to target up to extremely large programs (~ 1 million symbol table entries) within a tiny memory
footprint to permit the widest range of use. If you have a different, more specialized purpose, do let us know.
RESTRICTIONS IN PLACE IF RUNNING IN UNPAID, DEMONSTRATION MODE:
1) Only the first small enough, (sought for) macro call explanation or (any) conditional compilation explanation that is encountered is explained,
such that the explanation fits within a brief limit.
2) Indentation requests are ignored.
3) Only 100 tokens are written out for a translation unit for the -write option.