home *** CD-ROM | disk | FTP | other *** search
- /* =========================================================
- *
- * ALERT.C - General alert mechanism.
- *
- * Version 1.0
- *
- * COPYRIGHT(c) : Dis Kit Project
- * CREATED : 11.8.1992
- * PROGRAMMER : Martti Ylikoski
- * NOTES :
- * LAST UPDATE :
- *
- *
- * ==========================================================*/
- #define INCL_DOS
- #include <os2.h>
- #include <stdio.h>
- #include <string.h>
- #include <netcons.h>
- #include <message.h>
- #include "alert.h"
-
-
- /*
- int main(int argc, char *argv[])
- {
-
- if (argc < 3)
- {
- printf("%s: at least 2 arguments are needed!\Exiting...\n", argv[0]) ;
- printf("Usage: %s user message\n", argv[0] ) ;
- return( 1 ) ;
- }
-
- alert(argv[1], argv[2]) ;
- return( 0 ) ;
- }
- */
-
- int alert (char *machine, char *user, char *message)
- {
- unsigned short ret ;
-
- ret = NetMessageBufferSend(machine, user, message,
- (unsigned short) strlen(message)) ;
- if (ret != 0)
- return( ERROR ) ;
- else
- return( OK ) ;
- }
-