vipsi - the friendly vip script interpreter

Developer Documentation

The Beauty Within

Hi!

I'm a visual guy with bad eyes Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
broken memory. sometimes it really helps me Flow control: if … thenif i follow Flow control: if … then
Flow control: try … then
the
following design guides, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
therefore i ask you that you Flow control: try … thentry to follow Flow control: if … then
Flow control: try … then
them
too to exactly that extent which Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
disturb you ;-)

Class Var

Flow control: if … then
Flow control: try … then
The
Developer Documentation: Class Varclass Var is part of Flow control: if … then
Flow control: try … then
the
project lib-kio!

List functions: thisthis class implements all Flow control: if … then
Flow control: try … then
the
Glossary: Variable, var_refvariables used in vipsi Example Scripts: CGI Scripts
Example Scripts: Scripts
scripts
.

Currently it supports Data Types: Numbersnumbers (double float), Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
(Developer Documentation: Class Stringclass String), Instructions: procproc (Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
bodies: Developer Documentation: Class Stringclass String) Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
lists
. it has a full set of Vipsi command syntax: Operators
Operators
Glossary: Operator
operators
which work on nearly all data types. most notably they also work on Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
lists
; e.g. you can Operators: Multiply to Variable "*="
Operators: Multiply "*"
multiply
all Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
items by a Glossary: number, num_valnumber Glossary: Valuevalue Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
a matching second Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
to Flow control: do … loopdo vector operations.

Class String

Flow control: if … then
Flow control: try … then
The
Developer Documentation: Class Varclass Var is part of Flow control: if … then
Flow control: try … then
the
project lib-kio!

List functions: thisThis class is used by Developer Documentation: Class Varclass Var for all Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Glossary: Variable, var_refvariables, Instructions: procproc Glossary: Variable, var_refvariables (Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
bodies) Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Glossary: Variable, var_refvariable Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
names
. it is also used in various Example Scripts: Librarieslibraries for passing Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
, since List functions: thisthis is Flow control: if … then
Flow control: try … then
the
natural format for Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
representation in vipsi, because Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Instructions: readread from Glossary: Variable, var_refvariables has List functions: thisthis format Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Instructions: requirerequires to have List functions: thisthis format whenever stored back in Glossary: Variable, var_refvariables.

Predefined Data Types

Text functions: file
Instructions: file
File
kio/standard_types.h defines a lot of basic Data Types
Invariants: Data types
data types
to shorten Flow control: if … then
Flow control: try … then
the
source. there is no real need to use Flow control: if … then
Flow control: try … then
them
, but it would be nice. List functions: thisthis is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
a complete Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
, just Flow control: if … then
Flow control: try … then
the
most commonly used:

uchar       unsigned char       unsigned character
ushort      unsigned short      unsigned short integer
ulong       unsigned long       unsigned long integer
uint        unsigned Numeric functions: intint        unsigned integer

str         char *              indicates a 0-terminated c-string
cstr        char const *        0-terminated c-string Constants
Glossary: Constant
constant
ptr char * pointer to just a char cptr char const * pointer to a Constants
Glossary: Constant
constant
char uptr uchar * pointer to just an unsigned char Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
length-prefixed pascal-style Data Types: Text
Text functions: string
string
cuptr uchar const * pointer to unsigned Constants
Glossary: Constant
constant
characters OSErr short Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Numeric functions: intint (operating system) error code

You probably recognize how a prefixed u stands for unsigned Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
c stands for Constants
Glossary: Constant
constant
.

Project specific Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
project-independent general-use classes are as follows:

Data Types: Text
Text functions: string
String
Developer Documentation: Class Stringclass String Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
data cString const Developer Documentation: Class Stringclass String Constants
Glossary: Constant
constant
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
data Instructions: var
How does VScript::Value() work?: Var*&
Var
Developer Documentation: Class Stringclass String Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
data cVar const Developer Documentation: Class Stringclass String Constants
Glossary: Constant
constant
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
data

Flow control: if … then
Flow control: try … then
The
utf-8 character set handling module utf-8.h defines a lot of own Data Types
Invariants: Data types
data types
:

UCS4Char            unsigned long       single character, UCS-4 encoded
UCS2Char            unsigned short      single character, UCS-2 encoded
UCS1Char            unsigned char       single character, UCS-1 (ISO Latin-1) encoded
UTF8Char            char const *        single character, UTF-8 encoded
UTF8CharPtr         char *              pointer to UTF-8 character
UTF8Str             char *              c-string, UTF-8 encoded
cUTF8CharPtr        char const *        pointer to UTF-8 character in const Data Types: Text
Text functions: string
string
List functions: thisthis is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
same as const UTF8CharPtr!

Any class Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Data Types
Invariants: Data types
data type
missing? send mail Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
i'll Operators: Add to Variable "+="
Operators: Add "+"
add
it.

uchar* VScript::Value ( uchar* ip, Var*&, int prio )

How does VScript::Value() work?

Instruction pointer

Like all Flow control: if … then
Flow control: try … then
the
associated Vipsi command syntax: Functions
Functions
Glossary: Function
functions
it takes Flow control: if … then
Flow control: try … then
the
current How does VScript::Value() work?: Instruction pointerinstruction pointer as it's first Vipsi command syntax: Arguments
Glossary: Arguments
argument
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: returnreturns Flow control: if … then
Flow control: try … then
the
updated pointer. Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
second: like all Flow control: if … then
Flow control: try … then
the
associated Vipsi command syntax: Functions
Functions
Glossary: Function
functions
it refuses work Flow control: if … then
Flow control: if … then
if the
List functions: globals
Shell Immediate Commands: globals
global
errno is set. List functions: thisthis allows you frequently to delay error testing, because you can combine a whole bunch of Functions with varying return types: call
Instructions: call
calls
before you really must test Flow control: if … thenif something went wrong.

Var*&

Flow control: if … then
Flow control: try … then
The
result of Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Expressions
Glossary: Expression
expression
which is currently executed is returned in a supplied Glossary: Variable, var_refvariable. first you must allocate a Glossary: Variable, var_refvariable as temporary data cell where Flow control: if … then
Flow control: try … then
the
result can be stored in, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … then
Flow control: try … then
then
you must pass a pointer to List functions: thisthis temp cell by reference.

Why so complicated? vipsi Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
know about reference Glossary: Variable, var_refvariables. but frequently you need a reference to a Glossary: Variable, var_refvariable Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
it saves you a lot of time Checkout source:: If you don't have a developer login at sourceforgeif you don't have to copy Flow control: if … then
Flow control: try … then
the
result into Flow control: if … then
Flow control: try … then
the
supplied temp cell. on Flow control: if … then
Flow control: try … then
the
other hand, frequently you can't Flow control: returnreturn a reference to a result but you can only Flow control: returnreturn it by Glossary: Valuevalue. have a look Operators: Make Identifier "@"at Flow control: if … then
Flow control: try … then
the
following example:

fooVar = 45;

On Flow control: if … then
Flow control: try … then
the
left side of Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Operators
Operators
Glossary: Operator
operator
= stands a Glossary: Variable, var_refvariable. when Glossary: ValueValue() is called to parse Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Expressions
Glossary: Expression
expression
it is required that it Flow control: returnreturns a reference to that Glossary: Variable, var_refvariable. Flow control: if … then
Flow control: try … then
the
current contents of fooVar is of no interest.

On Flow control: if … then
Flow control: try … then
the
right side of Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Operators
Operators
Glossary: Operator
operator
= stands a Literals: Number literals
Numbers: Number literals
number literal
(Constants
Glossary: Constant
constant
). when Glossary: ValueValue() is called to parse Flow control: if … then
Flow control: try … then
the
right side of Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Expressions
Glossary: Expression
expression
it cannot Flow control: returnreturn a reference to a Glossary: Variable, var_refvariable with List functions: thisthis Glossary: Valuevalue because there is simply no such Glossary: Variable, var_refvariable. you could circumvent List functions: thisthis in a lots of other ways, but i've done it List functions: thisthis way:

Flow control: if … then
Flow control: if … then
If the
result cannot be returnd by reference, Flow control: if … then
Flow control: try … then
the
Glossary: Valuevalue is stored in Flow control: if … then
Flow control: try … then
the
supplied temp cell (as accessible by Flow control: if … then
Flow control: try … then
the
passed pointer) Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … then
Flow control: try … then
the
pointer is left to point to List functions: thisthis temp cell.

Flow control: if … then
Flow control: if … then
If the
result can be returned by reference, Flow control: if … then
Flow control: try … then
the
supplied temp cell is ignored Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … then
Flow control: try … then
the
passed-by-reference pointer is set to point to Flow control: if … then
Flow control: try … then
the
result.

Whether Flow control: if … then
Flow control: try … then
the
returned result is a Glossary: Valuevalue Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
a reference can be tested by Flow control: if … then
Flow control: try … then
the
Functions with varying return types: call
Instructions: call
caller
, Flow control: if … thenif he Operators: Comparisons > < >= <= != ==compares Flow control: if … then
Flow control: try … then
the
Glossary: Variable, var_refvariable pointer with it's initial Glossary: Valuevalue, Flow control: if … then
Flow control: try … then
the
address of Flow control: if … then
Flow control: try … then
the
temp cell. so he can see whether he got a reference when he needed one Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
he can see, whether he must duplicate Flow control: if … then
Flow control: try … then
the
passed result from Flow control: if … then
Flow control: try … then
the
referenced Glossary: Variable, var_refvariable Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
can move Flow control: if … then
Flow control: try … then
the
data from Flow control: if … then
Flow control: try … then
the
temp cell to Flow control: if … then
Flow control: try … then
the
target. Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
he can already supply Flow control: if … then
Flow control: try … then
the
target as temp cell. sorry, he can't. List functions: thisthis will lead to some dangerous conflicts.

prio

Glossary: ValueValue() Functions with varying return types: call
Instructions: call
calls
itself recursively.

An Vipsi command syntax: Expressions
Glossary: Expression
expression
is made out of multiple subexpressions connected by Vipsi command syntax: Operators
Operators
Glossary: Operator
operators
:

<term>  =  <term> <op> <term>

where you recursively can Text functions: replace
Instructions: replace
replace
a term again by <term> <op> <term>.

when you evaluate an Vipsi command syntax: Expressions
Glossary: Expression
expression
with multiple Vipsi command syntax: Operators
Operators
Glossary: Operator
operators
, you have to obey Operators: Operator precedenceoperator precedence. Flow control: if … then
Flow control: try … then
the
precedence of Flow control: if … then
Flow control: try … then
the
currently pending Vipsi command syntax: Operators
Operators
Glossary: Operator
operator
is passed in How does VScript::Value() work?: prioprio. imagine Flow control: if … then
Flow control: try … then
the
following Vipsi command syntax: Expressions
Glossary: Expression
expression
:

55 + 66 * 77;

Flow control: if … then
Flow control: try … then
the
initial Functions with varying return types: call
Instructions: call
caller
Instructions: getgets back Flow control: if … then
Flow control: try … then
the
Glossary: Valuevalue 5132 Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
resumes parsing. he will run into Flow control: if … then
Flow control: try … then
the
; Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
probably decide that it's ok.

Map of Project Files

Project Directory "vipsi/"

execute.h                   Flow control: if … then
Flow control: try … then
the
main execution Flow control: do … looploop: VScript::Execute(…) main.cp main() mod_vipsi.c Apache module mod_vipsi.cp Apache module Stream.cp class Stream to implement vipsi's i/o commands Stream.h SystemIO.cp platform specific Text functions: file
Instructions: file
file
handling et.al. SystemIO.h token.cp Flow control: if … then
Flow control: try … then
the
source Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
tokenizer: Tokenize() token.h token (List functions: words
Shell Immediate Commands: words
word
) definitions Glossary: Valuevalue.h Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Expressions
Glossary: Expression
expression
evaluator: VScript::Glossary: ValueValue(…) custom_errors.h additional error codes (included by Example Scripts: Librarieslibraries/kio/errors.h) version.h version Text functions: file
Instructions: file
file
VScript.cp List functions: thisthis class implements Flow control: if … then
Flow control: try … then
the
Example Scripts: CGI Scripts
Example Scripts: Scripts
script
interpreter VScript.h examples/ some Example Scriptsexample scripts test_suite.vs syntax test suite *.prefs Appendix: Preferences Filespreferences files for Installationinstallation *.vl library Text functions: file
Instructions: file
files
for Installationinstallation in /usr/local/lib/vipsi/ vip.xml Appendix: Syntax Highlightingsyntax highlighting for kate Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
kwrite ****Text functions: info
Shell Immediate Commands: info
INFO
****/ done.txt completed tasks todo.txt pending tasks unix/ Text functions: file
Instructions: file
files
for Installationinstallation on unix-style systems configure.in input data for autoconf Makefile.in input data for configure config.h.in input data for configure configure Example Scripts: CGI Scripts
Example Scripts: Scripts
script
to make a Makefile for your system install.sh required Example Scripts: CGI Scripts
Example Scripts: Scripts
script
config.Operators: Subtract "-"sub required Example Scripts: CGI Scripts
Example Scripts: Scripts
script
aclocal.m4 required Example Scripts: CGI Scripts
Example Scripts: Scripts
script
config.guess required Example Scripts: CGI Scripts
Example Scripts: Scripts
script
shtool required Example Scripts: CGI Scripts
Example Scripts: Scripts
script

Library Directory "vipsi/libraries/"

List functions: thisThis is a shared directory for vipsi Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
other projects.

compress/               data compression
cstrings/               c-string library with ad-hoc Data Types: Text
Text functions: string
string
pool ustring/ Developer Documentation: Class Stringclass String for Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
data Data Types: Text
Text functions: string
strings
Instructions: sortsort/ Instructions: sortsort Vipsi command syntax: Functions
Functions
Glossary: Function
function
template utf-8/ utf-8 handling Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
convert: Text conversions:
convert: Text conversions:
text conversion
library Instructions: var
How does VScript::Value() work?: Var*&
var
/ Developer Documentation: Class Varclass Var for Glossary: Variable, var_refvariables for interpreters et.al. kio/ my all-times-needed header Text functions: file
Instructions: file
files
abort.cp aborting abort.h errors.cp set Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Instructions: getget errors errors.h error codes Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
texts
kio.h Flow control: if … then
Flow control: try … then
the
include-it-all header Numeric functions: log
Numeric functions: loge
Instructions: log
log
.cp message logging Numeric functions: log
Numeric functions: loge
Instructions: log
log
.h nice_defines.h frequently used simple Vipsi command syntax: Functions
Functions
Glossary: Function
functions
standard_types.h standard Data Types
Invariants: Data types
data types
unix/ file_utilities.cp unix Text functions: file
Instructions: file
file
utilities file_utilities.h os_utilities.cp unix system Functions with varying return types: call
Instructions: call
call
utilities os_utilities.h

How to use the cvs

Introduction to the Concurrent Versions System CVS

List functions: thisThis Introductionintroduction is aimed to developers, Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
admins. in essence it says nothing more than sourceforge's documentation, it only leaves out 90% of it. :-) though it's written for developers working for vipsi, it's generally appliable for any other project Operators: Make Identifier "@"at sourceforge.

First i'll tell you some basics. Flow control: if … then
Flow control: try … then
then
all Flow control: if … then
Flow control: try … then
the
unix stuff; as far as i consider it useful. finally i hope i can Operators: Add to Variable "+="
Operators: Add "+"
add
some Windows stuff too.

Flow control: if … thenIf you Numeric functions: findfind an error, something Built-in functions and constants: Unclear:
Built-in instructions: Unclear:
unclear
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
important to Operators: Add to Variable "+="
Operators: Add "+"
add
, please send me a note Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
i'll Operators: Add to Variable "+="
Operators: Add "+"
add
it.

Why do we need a CVS?

When multiple developers work on Flow control: if … then
Flow control: try … then
the
same source it is very likely that they simultaneously modify Flow control: if … then
Flow control: try … then
the
same Text functions: file
Instructions: file
files
. there needs to be some means of synchronization, merging Flow control: if … then
Flow control: try … then
the
different Flow controlbranches back into Flow control: if … then
Flow control: try … then
the
official source. you won't Flow control: do … loopdo List functions: thisthis by hand.

How does it work, generally speaking?

Flow control: if … then
Flow control: try … then
The
main source is hosted Operators: Make Identifier "@"at sourceforge Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
it is called Flow control: if … then
Flow control: try … then
the
"repository". when you decide to List functions: join
Instructions: join
join
Flow control: if … then
Flow control: try … then
the
effort on Flow control: if … then
Flow control: try … then
the
project, you must retrieve a copy of Flow control: if … then
Flow control: try … then
the
source, formally called "checkout", just like a book from Flow control: if … then
Flow control: try … then
the
library.

Numeric functions: nowNow you can work with your List functions: localslocal copy of Flow control: if … then
Flow control: try … then
the
source, make modifications to it, compile it, verify that it works as expected Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Operators: Add to Variable "+="
Operators: Add "+"
add
some documentation.

Regularly you must synchronize Flow control: if … then
Flow control: try … then
the
main source, so that your fellow developpers can use your Instructions: newnew Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
improved code. List functions: thisthis is done in two Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
- maybe - three steps:

Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
note
:
Flow control: if … thenif you can't resolve Flow control: if … then
Flow control: try … then
the
problems after you have updated your List functions: localslocal copy, you may well delete your List functions: localslocal copy of Flow control: if … then
Flow control: try … then
the
source discarding all your modifications so far. to reduce Flow control: if … then
Flow control: try … then
the
probability of such an uncomfortable situation you should update your source right before you start work on it, thus incorporating all commits which were made in Flow control: if … then
Flow control: try … then
the
past hours Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
days, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
synchronize Flow control: if … then
Flow control: try … then
the
repository every time you come to a safe state in your source modifications, which will Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
leave it unusable for others.

How does it work for me?

Obviously you need cvs installed on your computer to retrieve Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
hand back source from Flow control: if … then
Flow control: try … then
the
repository. you hopefully already have Flow control: if … then
Flow control: try … then
the
cvs command installed on your system. Flow control: if … thenif Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
, slot-in your OS installer Instructions: cd
Shell Immediate Commands: cd
CD
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
install it.

It is required to Numeric functions: log
Numeric functions: loge
Instructions: log
log
into Flow control: if … then
Flow control: try … then
the
cvs server Operators: Make Identifier "@"at sourceforge using Flow control: if … then
Flow control: try … then
the
secure shell ssh. so you must also verify that you have installed Flow control: if … then
Flow control: try … then
the
ssh command.

A comprehensive introduction to the ssh can be found on sourceforge's documentation page.

(1) your initial checkout of the source

cvs looks for some environment Glossary: Variable, var_refvariables, which should be set before it is executed. you can also supply these Glossary: Valuevalues as command line parameters there are 3 environment Glossary: Variable, var_refvariables to set.

Flow control: if … thenIf you use bash Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
something similar:

bash$ export EDITOR=joe
bash$ export CVS_RSH=ssh
bash$ export CVSROOT=YOUR_NAME@cvs.sourceforge.net:/cvsroot/vipsi

Flow control: if … thenif you use Flow control: if … then
Flow control: try … then
the
csh:

csh> setenv EDITOR  joe
csh> setenv CVS_RSH ssh
csh> setenv CVSROOT YOUR_NAME@cvs.sourceforge.net:/cvsroot/vipsi

Flow control: if … then
Flow control: try … then
The
EDITOR Glossary: Variable, var_refvariable is only required for committing Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
you may have configured your system so that List functions: thisthis Glossary: Variable, var_refvariable is already set when you start a shell. set it to your favourite editor Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
you'll Flow control: end
Shell Immediate Commands: exit, quit, end
end
up with vi, Flow control: if … then
Flow control: try … then
the
default.

CVS_RSH tells your cvs that it must use Flow control: if … then
Flow control: try … then
the
ssh for connections to Flow control: if … then
Flow control: try … then
the
cvs Operators: Make Identifier "@"at sourceforge. List functions: thisthis Glossary: Variable, var_refvariable is required in all operations.

CVSROOT tells your cvs Flow control: if … then
Flow control: try … then
the
location of Flow control: if … then
Flow control: try … then
the
repository. List functions: thisthis is required only for Flow control: if … then
Flow control: try … then
the
initial checkout. you can also supply List functions: thisthis information directly to Flow control: if … then
Flow control: try … then
the
cvs command with Flow control: if … then
Flow control: try … then
the
-d option.

Go to Flow control: if … then
Flow control: try … then
the
directory where you want to settle your List functions: localslocal copy of Flow control: if … then
Flow control: try … then
the
source. it is also ok to retrieve it anywhere Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
copy Flow control: if … then
Flow control: try … then
the
whole thing around on your harddisk.

Checkout Flow control: if … then
Flow control: try … then
the
source. vipsi's source tree is currently List functions: split
Instructions: split
split
into three subtrees:

your_dev_root/
your_dev_root/vipsi/                  <-- from project "vipsi"
your_dev_root/vipsi/documentation     <-- from project "vipsi"
your_dev_root/vipsi/Example Scripts: Librarieslibraries         <-- from project "lib-kio"

so, to checkout all sources Flow control: do … loopdo Flow control: if … then
Flow control: try … then
the
following:
pre
bash$ Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT
bash$ export CVS_RSH=ssh
bash$ cvs -d:ext:YOU@cvs.sourceforge.net:/cvsroot/vipsi checkout vipsi
bash$ cvs -d:ext:YOU@cvs.sourceforge.net:/cvsroot/vipsi checkout documentation
bash$ cvs -d:ext:YOU@cvs.sourceforge.net:/cvsroot/lib-kio checkout Example Scripts: Librarieslibraries
bash$ mv Example Scripts: Librarieslibraries vipsi/
bash$ mv documentation vipsi/

Numeric functions: nownow you have your own copy of Flow control: if … then
Flow control: try … then
the
source Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
can work on it. don't touch Flow control: if … then
Flow control: try … then
the
folders named CVS. they contain administrative Text functions: file
Instructions: file
files
for cvs Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
must remain in Flow control: if … then
Flow control: try … then
the
folders they reside in.

(2) update your local copy from the repository

instruct cvs to use Flow control: if … then
Flow control: try … then
the
ssh, go to Flow control: if … then
Flow control: try … then
the
directory which you want to update Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: do … loopdo it:

bash$  export CVS_RSH=ssh
bash$  Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT/vipsi bash$ cvs update

cvs most times works on Flow control: if … then
Flow control: try … then
the
current directory Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
retrieves most required informations from Flow control: if … then
Flow control: try … then
the
data stored in Flow control: if … then
Flow control: try … then
the
CVS folders. so in List functions: thisthis case you only need to define CVS_RSH so that Flow control: if … then
Flow control: try … then
the
ssh is used. perhaps some time they will store List functions: thisthis in Flow control: if … then
Flow control: try … then
the
CVS folders too.

there are some useful options to update which you may decide to use:

Flow control: if … then
Flow control: try … then
the
option -d tells cvs that it shall create Instructions: newnew subdirectories in your List functions: localslocal source tree to Numeric functions: matchmatch Instructions: newnew directories in Flow control: if … then
Flow control: try … then
the
repository. cvs Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
create Flow control: if … then
Flow control: try … then
them
by default! you must specify List functions: thisthis option.

Appending option -P has Flow control: if … then
Flow control: try … then
the
opposite effect: Flow control: if … thenif a subdirectory becomes empty after cvs update, Flow control: if … then
Flow control: try … then
then
it is silently removed.

You may Numeric functions: findfind it best to always Functions with varying return types: include
Instructions: include
include
these two options:

bash$ cvs update -dP

(3) resolve conflicts

When you update your copy of Flow control: if … then
Flow control: try … then
the
source, cvs Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
lists
all Text functions: file
Instructions: file
files
inspected Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
prepends Flow control: if … then
Flow control: try … then
them
with a dir: flagsflag:

cvs server: Updating .   Text functions: info
Shell Immediate Commands: info
info
: cvs starts to inspect Flow control: if … then
Flow control: try … then
the
current directory M Glossary: Valuevalue.cp Glossary: Valuevalue.cp has been locally modified (by you) P Glossary: Valuevalue.h Glossary: Valuevalue.h is updated in Flow control: if … then
Flow control: try … then
the
cvs, patches were transferred U verrors.h verrors.h is updated in Flow control: if … then
Flow control: try … then
the
cvs, Text functions: file
Instructions: file
file
was transferred anew C token.h modified simultaneously in overlapping lines: collision!

You must Instructions: editedit Flow control: if … then
Flow control: try … then
the
incriminated Text functions: file
Instructions: file
files
, in Flow control: if … then
Flow control: try … then
the
above example token.h, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
work out Flow control: if … then
Flow control: try … then
the
problems manually before you can commit your changes. differences are marked similarly to a diff output Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
look very prominent. working out Flow control: if … then
Flow control: try … then
the
problems may be easy - Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
nearly impossible. you may decide to discard your changes Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
checkout Flow control: if … then
Flow control: try … then
the
source anew, because you can't resolve Flow control: if … then
Flow control: try … then
the
collissions. to reduce Flow control: if … then
Flow control: try … then
the
probability of such an uncomfortable situation update your source regularly!

(4) synchronize the repository from your source

Go to Flow control: if … then
Flow control: try … then
the
directory which you want to commit back to Flow control: if … then
Flow control: try … then
the
repository. Flow control: if … then
Flow control: try … then
then
commit your source:

bash$ export CVS_RSH=ssh
bash$ Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT/vipsi bash$ cvs commit -m "Operators: Add to Variable "+="
Operators: Add "+"
add
a Vipsi command syntax: Commentscomment about List functions: thisthis commit here"

Flow control: if … thenIf you forget Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Commentscomment Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
intentionally leave it out, cvs starts Flow control: if … then
Flow control: try … then
the
editor as mentioned above for you to insert one. in List functions: thisthis case it is better that you have Flow control: if … then
Flow control: try … then
the
EDITOR Glossary: Variable, var_refvariable set:

bash$ export EDITOR=joe
bash$ export CVS_RSH=ssh
bash$ Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT/vipsi bash$ cvs commit

List functions: thisThis will fire up Flow control: if … then
Flow control: try … then
the
editor joe after you have entered Flow control: if … then
Flow control: try … then
the
commit command.

(5) add files and directories

Sometimes you must introduce Instructions: newnew Text functions: file
Instructions: file
files
into Flow control: if … then
Flow control: try … then
the
source tree. cvs Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
automatically Operators: Add to Variable "+="
Operators: Add "+"
add
all Text functions: file
Instructions: file
files
in Flow control: if … then
Flow control: try … then
the
directories you commit to Flow control: if … then
Flow control: try … then
the
repository. it only updates Flow control: if … then
Flow control: try … then
the
Text functions: file
Instructions: file
files
which it initially got with checkout. in fact, i have a lot more Text functions: file
Instructions: file
files
around in vipsi's source tree, tests, docs Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
most notably intermediate Text functions: file
Instructions: file
files
from Flow control: if … then
Flow control: try … then
the
compiler. they are more Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
less ignored by cvs.

To Operators: Add to Variable "+="
Operators: Add "+"
add
a Text functions: file
Instructions: file
file
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
directory to Flow control: if … then
Flow control: try … then
the
repository, you must create it, Operators: Add to Variable "+="
Operators: Add "+"
add
it to your List functions: localslocal cvs Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
submit Flow control: if … then
Flow control: try … then
the
change:

bash$ export CVS_RSH=ssh
bash$ Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT/vipsi bash$ cvs update bash$ mkdir testdir bash$ cvs Operators: Add to Variable "+="
Operators: Add "+"
add
testdir bash$ cvs commit -m "it's a test only"

Don't Operators: Add to Variable "+="
Operators: Add "+"
add
directories just for fun - they cannot be removed from Flow control: if … then
Flow control: try … then
the
cvs repository!

(6) delete files and directories

when you reorganize parts of your source it may also happen, that entire Text functions: file
Instructions: file
files
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
directories become obsolete. to remove a Text functions: file
Instructions: file
file
from Flow control: if … then
Flow control: try … then
the
repository, you first must delete it in your List functions: localslocal tree (for security reasons), Flow control: if … then
Flow control: try … then
then
remove it from your List functions: localslocal cvs Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
finally submit Flow control: if … then
Flow control: try … then
the
change:

bash$ export CVS_RSH=ssh
bash$ Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT/vipsi bash$ cvs update bash$ rm testfile bash$ cvs rm testfile bash$ cvs commit -m "it's a test only"

Directories cannot be removed. Flow control: if … then
Flow control: try … then
the
only thing you can Flow control: do … loopdo is to delete all Text functions: file
Instructions: file
files
in it Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
use Flow control: if … then
Flow control: try … then
the
-P option whenever you update your List functions: localslocal source. Flow control: if … then
Flow control: try … then
the
-P option prunes empty directories from your List functions: localslocal copy, as told above.

(7) Renaming files and folders

Unluckily enough, List functions: thisthis is also Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
supported by Flow control: if … then
Flow control: try … then
the
cvs. instead, you must delete Flow control: if … then
Flow control: try … then
the
old Text functions: file
Instructions: file
file
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Operators: Add to Variable "+="
Operators: Add "+"
add
it with Flow control: if … then
Flow control: try … then
the
Instructions: newnew Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
:

bash$ export CVS_RSH=ssh
bash$ Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT/vipsi bash$ cvs update bash$ mv oldname newname bash$ cvs rm oldname bash$ cvs Operators: Add to Variable "+="
Operators: Add "+"
add
newname bash$ cvs commit -m "it's a test only"

Because directories cannot be removed from Flow control: if … then
Flow control: try … then
the
cvs, they cannot be "moved" List functions: thisthis way either. all you can Flow control: do … loopdo is create a Instructions: newnew directory Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
ignore Flow control: if … then
Flow control: try … then
the
old one...

The Windows version

Still working on that - i don't have Windows! maybe s.o. Flow control: if … then
Flow control: try … then
else
will Flow control: do … loopdo List functions: thisthis for me?

Valid HTML   Valid CSS