Example #1
0
// *appname* _ *commandname*
  void GeoMap_MyCommand(void)
  {
  struct resbuf *prb= ads_getargs();

    ads_printf( _T( "\nHello From Brx arx command GeoMap_MyCommand\n"));
    ads_retint( 1);

  }
Example #2
0
// ads_ *commandname*
  int ads_MyCommand12(void)
  {
  struct resbuf *prb= ads_getargs();

    ads_printf( _T( "\nHello From Brx lisp function ads_MyCommand12\n"));
    ads_retint( 12);
    return( RSRSLT);

  }
Example #3
0
// ads_ *commandname*
  int ads_MyCommand11(void)
  {
  struct resbuf *prb= ads_getargs();

    ads_printf( _T( "\nHello From Brx lisp command ads_MyCommand11\n"));
    ads_retint( 11);
    return( RSRSLT);

  }
Example #4
0
// ads_ *functionname*
  int ads_MyFunc10(void)
  {
  struct resbuf *prb= ads_getargs();

    ads_printf( _T( "\nHello From Brx lisp function ads_MyFunc10\n"));
    ads_retint( 10);
    return( RSRSLT);

  }
Example #5
0
// ads_ *commandname*
  int ads_MyCommand(void)
  {
  struct resbuf *prb= ads_getargs();

    ads_printf( _T( "\nHello From Brx ads command ads_MyFunc\n"));
    ads_retint( 2);
    return( RSRSLT);

  }
Example #6
0
int ads_perror()
{
    struct resbuf *argl, errval;

    argl = ads_getargs();
    if (ads_getfuncode() != 0)      /* This is the ONLY function here */
        return RSRSLT;
    if (ads_getvar("ERRNO", &errval) == RTERROR)
        return RSRSLT;
    if ((errval.resval.rint < 1) || (errval.resval.rint > ELEMENTS(errmsg)
#ifdef MAX_OL_ERRNO
		|| errval.resval.rint > MAX_OL_ERRNO
#endif
		))
        return RSRSLT;
    if (argl && argl->restype == RTSTR && strlen(argl->resval.rstring))
        ads_printf("%s: ", argl->resval.rstring);
    ads_printf("%s\n", errmsg[errval.resval.rint - 1]);
    ads_relrb(argl);
    ads_retvoid();
    return RSRSLT;
}