File: module1.cc

package info (click to toggle)
lftp 4.9.3-1.1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 17,496 kB
  • sloc: ansic: 83,392; cpp: 58,864; sh: 5,543; yacc: 1,846; makefile: 289; perl: 147; sed: 16
file content (14 lines) | stat: -rw-r--r-- 370 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <config.h>
#include "CmdExec.h"

Job *cmd_test1(CmdExec *parent)
{
   parent->printf("test1 called with %d arguments\n",parent->args->count());
   parent->exit_code=0;
   return 0;
}

CDECL void module_init(int argc,const char *const *argv)
{
   CmdExec::RegisterCommand("test1",cmd_test1,"test1 [args]","This test command prints the number of arguments\n");
}