Difference between revisions of "Manual:Zone Manual/General Compiler Information/The VMC pre-processor"

From DikuMUD Wiki
Jump to navigation Jump to search
(checked against the current code (wiki review 2026-11-15))
 
Line 1: Line 1:
 
=== The VMC pre-processor ===
 
=== The VMC pre-processor ===
 +
Before vmc reads a zone, its pre-processor goes through the file. It works like a search and replace tool: it removes comments, replaces macros with what they stand for, and pastes in include files. It works like the C pre-processor (cpp); if you know that one, skim this page for the differences at the end.
  
−
The VMC Pre-Processor (VMC -p) can be thought of as a powerful
+
To see what the pre-processor made of your zone, run vmc with <code>-p</code>. It prints the zone after pre-processing and compiles nothing:
−
search and replace tool used by the compiler before it
+
<pre>
−
converts the zone to its binary form.  This tool gives you the
+
../bin/vmc -p -d ../etc/ -I../include/ swamp.zon
−
builder the ability to add comments, create short hand expressions
+
</pre>
−
for repeated items, include other files in your zone, and even to do
 
−
some minor calculations when necessary.
 
  
−
<blockquote style="background-color: #E8E8E8; font-style: italic; "> If you have coded in C or c++ before the Pre Processor the VMC uses is no different and you can skip this section. </blockquote>
+
==== Comments ====
−
==== Commenting your zone ====
+
Comments are notes for you and other builders; vmc never sees them. Write them between <code>/*</code> and <code>*/</code> (they can span several lines), or after <code>//</code> to the end of the line:
 +
<pre>
 +
/*
 +
  The following ten rooms are the swamp,
 +
  there are 97 rooms in the zone.
 +
*/
  
−
The practice of adding comments to your zone is a good thing
+
// Zone first written in 1994
−
to get into so the administrators and other builders can help
+
</pre>
−
you with your zone and know what you were trying to do if there are
+
A comment can go anywhere outside a string, even inside a field:
−
problems.  Comments aren't as important when writing the zone as
+
<pre>
−
they will be when you start writing your own special DIL functions
+
// I am going to make a title now
−
but it is important to know how comments work and that you can use
+
title /* the keyword first */ "A mud hut" /* then the title */
−
them if you need to.  A comment is a block of text the compiler
+
</pre>
−
will never see and is there only for you and who ever reads the
+
To vmc this is the same as <code>title "A mud hut"</code>. Inside a string, <code>/*</code> and <code>//</code> are ordinary text: <code>title "A hut /* old */"</code> gives the hut that whole title.
−
file.  In order to make it so the compiler will not see the block of
 
−
text you must surround it by a set of symbols that tell the CPP to
 
−
strip it out before passing the zone on to the compiler. These
 
−
symbols are the '/*' and the '*/' symbols or the '//' symbols together in front of a single line.
 
  
−
In order to best explain how comments work we will give you a some
+
Use <code>/* */</code> for a comment of several lines and <code>//</code> for a single line. Comments matter most in DIL programs, but a note on why a room is set up the way it is helps whoever keeps your zone working later.
−
what strange example.  First we will start by showing you a very basic
 
−
line you will see time and time again in rooms.
 
−
<nowiki>
 
−
title "this is a title"</nowiki>
 
−
This is a title it will show up in everything from rooms, to objects
 
−
and even NPCs.  Now lets see what a commented line would look like.
 
−
<nowiki>
 
−
//I am going to make a title now
 
−
title /* I put the keyword
 
−
first*/ "this is a title/*then the title*/</nowiki>
 
−
This of course is very ugly but the point is not to be pretty it is
 
−
to show you both the first way and the second way will look
 
−
exactly the same to the compiler because all comments are removed
 
−
before the compiler ever gets it.  A better use of a comment in a
 
−
zone however would be something like this:
 
−
<nowiki>
 
−
/*
 
−
The following ten rooms are the vineyards,
 
−
there are 97 rooms in the zone.
 
−
*/
 
  
−
//Zone first created 1994</nowiki>
+
==== Macros ====
−
You will find comments will make coding large zones much easier
+
Some things you write many times. Say fifty rooms of your zone are huts with the same flags. Instead of writing
−
because you can add text meant just for the builders
+
<pre>
−
eyes.
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
</pre>
 +
fifty times, define a macro once, near the top of the zone:
 +
<pre>
 +
#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
</pre>
 +
and write <code>HUTFLAGS</code> in each room. If you later want the huts to be safe from teleporting too, change only the macro, and all fifty rooms change the next time you compile:
 +
<pre>
 +
#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS, UNIT_FL_NO_TELEPORT}
 +
</pre>
  
−
<blockquote style="background-color: #E8E8E8; font-style: italic; ">You will have to decide if you want a multi-line comment or a single line comment and use the '//' or the '/**/' respectively. The rule of thumb is if the comment is longer than 1 line it is easier to put the '/**/' around the comment than to comment each individual line.</blockquote>
+
A macro can take arguments. In a swamp every direction looks the same, so the exits can share one description:
−
==== Macros and what they can do for you ====
+
<pre>
 +
#define SEXIT(direction, place) direction to place descr \
 +
"You see the swamp stretch out for miles.";
 +
</pre>
 +
Then each exit is one short line:
 +
<pre>
 +
SEXIT(east, swamp1)
 +
SEXIT(north, swamp2)
 +
SEXIT(south, swamp3)
 +
</pre>
  
−
When making a zone you will find there are things you use more
+
Some rules:
−
than once. In fact you may find things you want others to use or
+
* In the <code>#define</code>, the <code>(</code> must follow the macro's name with no space. <code>#define SEXIT (direction, place) ...</code> defines a macro without arguments whose text starts with <code>(direction, place)</code>. Where you use the macro, a space is allowed: <code>SEXIT (east, swamp1)</code> works.
−
things you want to use in multiple zones. Its true you could block
+
* A <code>#define</code> is one line. To go on to the next line, end the line with <code>\</code>.
−
and copy and stick them everywhere. in fact that is what I did when
+
* A comma inside braces still separates arguments, so <code>NAMED({"wooden box", "box"})</code> passes two broken arguments. Define the list as a macro of its own and pass that:
−
I first started building. I soon found my zone file was
+
<pre>
−
extremely large and hard to upkeep. With a few minor changes and a
+
#define BOX_NAMES {"wooden box", "box"}
−
lot of deleting I used short hand or better known in the world of coding
+
...
−
as macros to make my zone readable.
+
names BOX_NAMES
 +
</pre>
 +
* Write your macros in capitals, so that they stand out from the fields. The headers do the same, with a few exceptions: the directions <code>north</code> ... <code>southwest</code>, <code>up</code> and <code>down</code> are macros (<code>north</code> becomes <code>exit[NORTH]</code>), and so are <code>dilend</code>, <code>pause</code> and <code>on_activation</code>. Don't use these words as names of your own.
  
−
Lets say you had some flags you were going to set in
+
Macros can use other macros:
−
fifty rooms and you knew they would all be the same.  You could type
+
<pre>
−
the following line 50 times.
+
#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS, UNIT_FL_NO_TELEPORT}
−
<nowiki>
+
#define MUDHUT movement SECT_INSIDE \
−
flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}</nowiki>
+
  HUTFLAGS
−
With the macros however you could make this much easier by just doing
+
</pre>
−
the following at the beginning of your zone.
 
−
<nowiki>
 
−
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}</nowiki>
 
−
Then where ever you want the flags you just type DIRTFLOOR.  You are
 
−
probably thinking, yeah big deal I can do that with block and copy.
 
−
True but there is another benefit to this.  Lets say later you
 
−
wanted to also make these 50 rooms no teleport.  All you would have
 
−
to change is the define like this:
 
−
<nowiki>
 
−
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT}</nowiki>
 
−
Now when you recompile all 50 rooms are changed and you didn't even
 
−
have to do a search and replace.
 
  
−
You can also make macros that take arguments.  The ability to
+
Most of the macros you will use are already written: the headers define a macro for every kind of weapon, armour, container, drink and money, and for hundreds of NPC races and professions. The room, object and NPC chapters show them.
−
take arguments is where macros take a leap and a bound out in front
 
−
of your favorite editor to allow you to do things you can not do easily
 
−
with search and replace.  Lets say you have an exit descr you
 
−
want to use in 50 swamp rooms because heck everything looks the same
 
−
in a swamp when you look one direction to the next.
 
−
<nowiki>
 
−
east to swamp1 descr
 
−
"You see the swamp stretch out for miles";</nowiki>
 
−
This could be made into a macro like:
 
−
<nowiki>
 
−
#define sexit(direction, place) direction to place descr \
 
−
"You see the swamp stretch out for miles.";</nowiki>
 
−
Then all you need to use it is:
 
−
<nowiki>
 
−
SEXIT(east,swamp1)
 
−
SEXIT(north,swamp2)
 
−
SEXIT(south,swamp3)</nowiki>
 
−
<blockquote style="background-color: #E8E8E8; font-style: italic; ">There is no space between 'SEXIT' and '(' that is important because the CPP sees 'SEXIT(' and 'SEXIT (' as two different things. It is also important to notice all defines must start at the beginning of the line and be either one line long or have a '\' telling the Pre Processor that it should continue with the next line as if it was this line.</blockquote>
 
  
−
You can also combine macros together so you have a set
+
==== Including other files ====
−
of macros like:
+
<code>#include</code> pastes another file into your zone. Every zone starts with
−
<nowiki>
+
<pre>
−
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT}
+
#include <macros.h>
−
#define DIRTSECT  movement SECT_INSIDE \
+
</pre>
−
DIRTFLOOR</nowiki>
+
<code>macros.h</code> includes the other headers you need: <code>values.h</code> and <code>vme.h</code> (the constants), <code>wmacros.h</code> (the object and DIL macros), <code>liquid.h</code> (drinks), and the NPC templates in <code>mhumanoid.h</code>, <code>chumanoid.h</code>, <code>monster.h</code>, <code>fantasy.h</code>, <code>plant.h</code> and <code>aquatic.h</code>. The headers are in <code>vme/include/</code> ([https://github.com/Seifert69/DikuMUD3/tree/master/vme/include on GitHub]); read them to see what a macro does. Nothing is included unless you ask for it.
−
You may have noticed I capitalize all macros. This is not a must but it is
 
−
suggested so you can easily tell what is a macro and what is not.
 
−
==== Including other files in your zone ====
 
  
−
Another function of the VMC Pre Processor,
+
vmc looks for <code>#include &lt;file&gt;</code> in the directories given with <code>-I</code>. It looks for <code>#include "file"</code> next to the zone file first, then in the <code>-I</code> directories. You can write your own header, for example with the macros shared by several of your zones, and include it the same way.
−
'#include', allows you to include other files  in
 
−
your zone file. The VME comes with some basic include files
 
−
you can use the macros out of and use as examples on how to make
 
−
your own include files.  These files are the
 
−
''composed.h'',, ''vme.h'',
 
−
''values.h'', ''base.h'',
 
−
''liquid.h'', and ''wmacros.h''.
 
−
Including ''composed.h'' will include all the rest
 
−
of
 
−
the include files into your zone because it has include statements
 
−
that use all the others.
 
  
−
<blockquote style="background-color: #E8E8E8; font-style: italic; ">You will want to include the files at the beginning of your zone file because all defines you use must be defined before you use them.</blockquote>
+
Put the includes and your <code>#define</code>s at the top of the file: a macro must be defined before it is used.
−
==== Doing minor calculations ====
 
  
−
You can also do minor calculations in a macro. Lets say you
+
==== Conditions ====
−
wanted to make it so the higher level an NPC was the heavier he
+
<code>#if</code>, <code>#ifdef</code>, <code>#ifndef</code>, <code>#elif</code>, <code>#else</code> and <code>#endif</code> keep or drop parts of the file, and <code>#undef</code> removes a macro. <code>#error "message"</code> stops the compile with that message (the quotes are needed). The guild zones use conditions to read different parts of one file: a teacher does <code>#define _ABILITY</code>, then <code>#include "guilddef.h"</code>, whose parts start with <code>#if defined(_ABILITY)</code>, <code>#elif defined(_SKILL)</code> and so on, and then <code>#undef _ABILITY</code>.
−
was and the taller he was. This would be simple with a macro.
+
 
−
<nowiki>
+
==== Calculations ====
−
#define MLEVEL(lvl) \
+
Wherever a field takes a number, you can write a sum: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code> and parentheses work, with whole numbers (<code>/</code> drops the remainder). vmc, not the pre-processor, does the sum, so a macro can pass its arguments into one:
−
level lvl \
+
<pre>
−
height lvl+72 \
+
#define CHEST(size) \
−
weight lvl*9</nowiki>
+
  weight 5 + (size) / 4 \
−
This macro would increase the height and weight depending on what
+
  capacity (size)
−
level you made the NPC pretty simple. There is much more a macro
+
</pre>
−
can do for you but the Pre Processor and all its uses go far beyond the scope
+
<code>CHEST(40)</code> becomes <code>weight 5 + (40) / 4 capacity (40)</code>: a weight of 15 and a capacity of 40. Put parentheses around each argument, as above. The pre-processor only pastes text, so without them <code>CHEST(20+20)</code> would give <code>weight 5 + 20+20 / 4</code>, which is 30.
−
of this manual. If you are really interested in all the neat things
+
 
−
it can do type the following command at the '$' prompt on your
+
The NPC headers work this way. <code>bottom.h</code> sets an NPC's height from its level:
−
Linux box.
+
<pre>
−
'''man cpp'''
+
#define SETHEIGHT(MLVL,minh,maxh) \
−
The C-Pre Processor is what the VMC Pre Processor is based on and most
+
height (((((maxh-minh)+1)*((MLVL*100)/199))/100)+minh)
−
if not all functions of the CPP work in the VMC.
+
</pre>
 +
 
 +
==== An example ====
 +
This zone uses everything above. It compiles as <code>swamp.zon</code>:
 +
<pre>
 +
#include <macros.h>
 +
 
 +
/*
 +
  The swamp: a mud hut and the swamp around it.
 +
*/
 +
 
 +
%zone swamp
 +
lifespan 20
 +
reset RESET_NOT
 +
creators {"manual"}
 +
 
 +
#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS, UNIT_FL_NO_TELEPORT}
 +
 
 +
#define MUDHUT movement SECT_INSIDE \
 +
  HUTFLAGS
 +
 
 +
#define SEXIT(direction, place) direction to place descr \
 +
"You see the swamp stretch out for miles.";
 +
 
 +
#define CHEST(size) \
 +
  weight 5 + (size) / 4 \
 +
  capacity (size)
 +
 
 +
#define BOX_NAMES {"wooden box", "box"}
 +
 
 +
%rooms
 +
 
 +
hut
 +
// I am going to make a title now
 +
title /* the keyword first */ "A mud hut" /* then the title */
 +
descr "A low hut of mud and reeds."
 +
MUDHUT
 +
east to swamp1 descr "The swamp.";
 +
end
 +
 
 +
swamp1
 +
title "In the swamp"
 +
descr "Mud, reeds and more mud."
 +
movement SECT_SWAMP
 +
west to hut descr "A mud hut.";
 +
SEXIT(north, swamp2)
 +
end
 +
 
 +
swamp2
 +
title "Deeper in the swamp"
 +
descr "The mud reaches your knees."
 +
movement SECT_SWAMP
 +
SEXIT(south, swamp1)
 +
end
 +
 
 +
%objects
 +
 
 +
chest
 +
names {"oak chest", "chest"}
 +
title "an oak chest"
 +
descr "An oak chest stands in the corner."
 +
CHEST(40)
 +
end
 +
 
 +
box
 +
names BOX_NAMES
 +
title "a wooden box"
 +
descr "A wooden box lies here."
 +
end
 +
 
 +
%end
 +
</pre>
 +
 
 +
==== Differences from cpp ====
 +
The pre-processor is not GNU cpp, but most of what cpp does works: <code>#define</code> with arguments, <code>#</code> and <code>##</code> in macros, <code>#include</code>, <code>#if</code> and its relatives, <code>#undef</code> and <code>#error</code>. Directives may be indented. Macros with a variable number of arguments (<code>...</code>) don't work, and <code>#error</code> wants its message in quotes. Its own manual is <code>vme/doc/pp.pdf</code> in the repository.
  
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: left;float:left;width:50%;'>[[Manual:Zone_Manual/General_Compiler_Information|Previous: General Compiler Information]]</div>
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: left;float:left;width:50%;'>[[Manual:Zone_Manual/General_Compiler_Information|Previous: General Compiler Information]]</div>
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: right;float:right;width:50%;'>[[Manual:Zone_Manual/Zone_Source_File|Next: Zone Source File]]</div>
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: right;float:right;width:50%;'>[[Manual:Zone_Manual/Zone_Source_File|Next: Zone Source File]]</div>

Latest revision as of 06:19, 15 November 2026

The VMC pre-processor

Before vmc reads a zone, its pre-processor goes through the file. It works like a search and replace tool: it removes comments, replaces macros with what they stand for, and pastes in include files. It works like the C pre-processor (cpp); if you know that one, skim this page for the differences at the end.

To see what the pre-processor made of your zone, run vmc with -p. It prints the zone after pre-processing and compiles nothing:

../bin/vmc -p -d ../etc/ -I../include/ swamp.zon

Comments

Comments are notes for you and other builders; vmc never sees them. Write them between /* and */ (they can span several lines), or after // to the end of the line:

/*
   The following ten rooms are the swamp,
   there are 97 rooms in the zone.
*/

// Zone first written in 1994

A comment can go anywhere outside a string, even inside a field:

// I am going to make a title now
title /* the keyword first */ "A mud hut" /* then the title */

To vmc this is the same as title "A mud hut". Inside a string, /* and // are ordinary text: title "A hut /* old */" gives the hut that whole title.

Use /* */ for a comment of several lines and // for a single line. Comments matter most in DIL programs, but a note on why a room is set up the way it is helps whoever keeps your zone working later.

Macros

Some things you write many times. Say fifty rooms of your zone are huts with the same flags. Instead of writing

flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

fifty times, define a macro once, near the top of the zone:

#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

and write HUTFLAGS in each room. If you later want the huts to be safe from teleporting too, change only the macro, and all fifty rooms change the next time you compile:

#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS, UNIT_FL_NO_TELEPORT}

A macro can take arguments. In a swamp every direction looks the same, so the exits can share one description:

#define SEXIT(direction, place) direction to place descr \
"You see the swamp stretch out for miles.";

Then each exit is one short line:

SEXIT(east, swamp1)
SEXIT(north, swamp2)
SEXIT(south, swamp3)

Some rules:

  • In the #define, the ( must follow the macro's name with no space. #define SEXIT (direction, place) ... defines a macro without arguments whose text starts with (direction, place). Where you use the macro, a space is allowed: SEXIT (east, swamp1) works.
  • A #define is one line. To go on to the next line, end the line with \.
  • A comma inside braces still separates arguments, so NAMED({"wooden box", "box"}) passes two broken arguments. Define the list as a macro of its own and pass that:
#define BOX_NAMES {"wooden box", "box"}
...
names BOX_NAMES
  • Write your macros in capitals, so that they stand out from the fields. The headers do the same, with a few exceptions: the directions north ... southwest, up and down are macros (north becomes exit[NORTH]), and so are dilend, pause and on_activation. Don't use these words as names of your own.

Macros can use other macros:

#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS, UNIT_FL_NO_TELEPORT}
#define MUDHUT movement SECT_INSIDE \
   HUTFLAGS

Most of the macros you will use are already written: the headers define a macro for every kind of weapon, armour, container, drink and money, and for hundreds of NPC races and professions. The room, object and NPC chapters show them.

Including other files

#include pastes another file into your zone. Every zone starts with

#include <macros.h>

macros.h includes the other headers you need: values.h and vme.h (the constants), wmacros.h (the object and DIL macros), liquid.h (drinks), and the NPC templates in mhumanoid.h, chumanoid.h, monster.h, fantasy.h, plant.h and aquatic.h. The headers are in vme/include/ (on GitHub); read them to see what a macro does. Nothing is included unless you ask for it.

vmc looks for #include <file> in the directories given with -I. It looks for #include "file" next to the zone file first, then in the -I directories. You can write your own header, for example with the macros shared by several of your zones, and include it the same way.

Put the includes and your #defines at the top of the file: a macro must be defined before it is used.

Conditions

#if, #ifdef, #ifndef, #elif, #else and #endif keep or drop parts of the file, and #undef removes a macro. #error "message" stops the compile with that message (the quotes are needed). The guild zones use conditions to read different parts of one file: a teacher does #define _ABILITY, then #include "guilddef.h", whose parts start with #if defined(_ABILITY), #elif defined(_SKILL) and so on, and then #undef _ABILITY.

Calculations

Wherever a field takes a number, you can write a sum: +, -, *, / and parentheses work, with whole numbers (/ drops the remainder). vmc, not the pre-processor, does the sum, so a macro can pass its arguments into one:

#define CHEST(size) \
   weight 5 + (size) / 4 \
   capacity (size)

CHEST(40) becomes weight 5 + (40) / 4 capacity (40): a weight of 15 and a capacity of 40. Put parentheses around each argument, as above. The pre-processor only pastes text, so without them CHEST(20+20) would give weight 5 + 20+20 / 4, which is 30.

The NPC headers work this way. bottom.h sets an NPC's height from its level:

#define SETHEIGHT(MLVL,minh,maxh) \
height (((((maxh-minh)+1)*((MLVL*100)/199))/100)+minh)

An example

This zone uses everything above. It compiles as swamp.zon:

#include <macros.h>

/*
   The swamp: a mud hut and the swamp around it.
*/

%zone swamp
lifespan 20
reset RESET_NOT
creators {"manual"}

#define HUTFLAGS flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS, UNIT_FL_NO_TELEPORT}

#define MUDHUT movement SECT_INSIDE \
   HUTFLAGS

#define SEXIT(direction, place) direction to place descr \
"You see the swamp stretch out for miles.";

#define CHEST(size) \
   weight 5 + (size) / 4 \
   capacity (size)

#define BOX_NAMES {"wooden box", "box"}

%rooms

hut
// I am going to make a title now
title /* the keyword first */ "A mud hut" /* then the title */
descr "A low hut of mud and reeds."
MUDHUT
east to swamp1 descr "The swamp.";
end

swamp1
title "In the swamp"
descr "Mud, reeds and more mud."
movement SECT_SWAMP
west to hut descr "A mud hut.";
SEXIT(north, swamp2)
end

swamp2
title "Deeper in the swamp"
descr "The mud reaches your knees."
movement SECT_SWAMP
SEXIT(south, swamp1)
end

%objects

chest
names {"oak chest", "chest"}
title "an oak chest"
descr "An oak chest stands in the corner."
CHEST(40)
end

box
names BOX_NAMES
title "a wooden box"
descr "A wooden box lies here."
end

%end

Differences from cpp

The pre-processor is not GNU cpp, but most of what cpp does works: #define with arguments, # and ## in macros, #include, #if and its relatives, #undef and #error. Directives may be indented. Macros with a variable number of arguments (...) don't work, and #error wants its message in quotes. Its own manual is vme/doc/pp.pdf in the repository.

Previous: General Compiler Information
Next: Zone Source File