#include <unistd.h>#include <sys/stat.h>#include <netinet/in.h>#include <sys/socket.h>#include <arpa/inet.h>#include <errno.h>#include "ycp/YCPBuiltinMisc.h"#include "ycp/YCPBoolean.h"#include "ycp/YCPInteger.h"#include "ycp/YCPVoid.h"#include "ycp/YCPString.h"#include "ycp/YCPCode.h"#include "ycp/StaticDeclaration.h"#include "ycp/y2log.h"#include "ycp/ExecutionEnvironment.h"Functions | |
| static YCPInteger | Time () |
| static YCPValue | Sleep (const YCPInteger &ms) |
| static YCPInteger | Random (const YCPInteger &max) |
| static YCPInteger | Srandom1 () |
| static YCPValue | Srandom2 (const YCPInteger &seed) |
| static YCPBoolean | Setenv2 (const YCPString &name, const YCPString &value, const YCPBoolean &overwrite) |
| static YCPBoolean | Setenv1 (const YCPString &name, const YCPString &value) |
| static YCPValue | Eval (const YCPValue &v) |
| static YCPString | s_sformat (const YCPValue &format, const YCPValue &_argv) |
| static YCPValue | Y2Log (loglevel_t level, const YCPString &format, const YCPList &args) |
| static YCPValue | Y2Debug (const YCPString &format, const YCPList &args) |
| static YCPValue | Y2Milestone (const YCPString &format, const YCPList &args) |
| static YCPValue | Y2Warning (const YCPString &format, const YCPList &args) |
| static YCPValue | Y2Error (const YCPString &format, const YCPList &args) |
| static YCPValue | Y2Security (const YCPString &format, const YCPList &args) |
| static YCPValue | Y2Internal (const YCPString &format, const YCPList &args) |
| static YCPValue | Y2FDebug (const YCPInteger &f, const YCPString &format, const YCPList &args) |
| static YCPValue | Y2FMilestone (const YCPInteger &f, const YCPString &format, const YCPList &args) |
| static YCPValue | Y2FWarning (const YCPInteger &f, const YCPString &format, const YCPList &args) |
| static YCPValue | Y2FError (const YCPInteger &f, const YCPString &format, const YCPList &args) |
| static YCPValue | Y2FSecurity (const YCPInteger &f, const YCPString &format, const YCPList &args) |
| static YCPValue | Y2FInternal (const YCPInteger &f, const YCPString &format, const YCPList &args) |
Variables | |
| StaticDeclaration | static_declarations |
eval Evaluate a YCP value. See also the builtin ``, which is kind of the counterpart to eval.
eval (``(1+2)) -> 3
| static YCPInteger Random | ( | const YCPInteger & | max | ) | [static] |
random Random number generator. Returns a random integer in the interval [0,MAX). srandom must be activated to get really random numbers.
| integer | MAX |
sformat Format a String FORM is a string that may contains placeholders 1, 2, ... Each placeholder is substituted with the argument converted to string whose number is after the %. Only 1-9 are allowed by now. The percentage sign is donated with %%.
| string | FORM | |
| any | PAR1 | |
| any | PAR2 | |
| any | ... |
| static YCPBoolean Setenv1 | ( | const YCPString & | name, | |
| const YCPString & | value | |||
| ) | [static] |
setenv Change or add an environment variable The setenv() function adds the variable to the environment with the value. If variable exist the value is changed.
| string | variable | |
| string | value |
| static YCPBoolean Setenv2 | ( | const YCPString & | name, | |
| const YCPString & | value, | |||
| const YCPBoolean & | overwrite | |||
| ) | [static] |
setenv Change or add an environment variable The setenv() function adds the variable to the environment with the value. If variable exist the value is changed.
| string | variable | |
| string | value | |
| boolean | overwrite |
| static YCPValue Sleep | ( | const YCPInteger & | ms | ) | [static] |
sleep Sleeps a number of milliseconds.
| integer | MILLISECONDS Time in milliseconds |
| static YCPInteger Srandom1 | ( | ) | [static] |
srandom Initialize random number generator Initialize random number generator with current date and time and returns the seed.
| static YCPValue Srandom2 | ( | const YCPInteger & | seed | ) | [static] |
srandom Initialize random number generator.
| integer | SEED |
| static YCPInteger Time | ( | ) | [static] |
time Return the number of seconds since 1.1.1970.
y2debug Log a message to the y2log.
Arguments are same as for sformat() builtin. The y2log component is "YCP", so you can control these messages the same way as other y2log messages.
| string | FORMAT | |
| any | PAR1 | |
| any | PAR2 | |
| any | ... |
y2error Log an error to the y2log.
| string | FORMAT | |
| any | PAR1 | |
| any | PAR2 | |
| any | ... |
| static YCPValue Y2FDebug | ( | const YCPInteger & | f, | |
| const YCPString & | format, | |||
| const YCPList & | args | |||
| ) | [static] |
| static YCPValue Y2FError | ( | const YCPInteger & | f, | |
| const YCPString & | format, | |||
| const YCPList & | args | |||
| ) | [static] |
| static YCPValue Y2FInternal | ( | const YCPInteger & | f, | |
| const YCPString & | format, | |||
| const YCPList & | args | |||
| ) | [static] |
| static YCPValue Y2FMilestone | ( | const YCPInteger & | f, | |
| const YCPString & | format, | |||
| const YCPList & | args | |||
| ) | [static] |
| static YCPValue Y2FSecurity | ( | const YCPInteger & | f, | |
| const YCPString & | format, | |||
| const YCPList & | args | |||
| ) | [static] |
| static YCPValue Y2FWarning | ( | const YCPInteger & | f, | |
| const YCPString & | format, | |||
| const YCPList & | args | |||
| ) | [static] |
y2internal Log an internal message to the y2log.
| string | FORMAT | |
| any | PAR1 | |
| any | PAR2 | |
| any | ... |
| static YCPValue Y2Log | ( | loglevel_t | level, | |
| const YCPString & | format, | |||
| const YCPList & | args | |||
| ) | [static] |
y2milestone Log a milestone to the y2log.
| string | FORMAT | |
| any | PAR1 | |
| any | PAR2 | |
| any | ... |
y2security Log a security message to the y2log.
| string | FORMAT | |
| any | PAR1 | |
| any | PAR2 | |
| any | ... |
y2warning Log a warning to the y2log.
| string | FORMAT | |
| any | PAR1 | |
| any | PAR2 | |
| any | ... |
1.5.3