1234567891011121314151617181920212223242526
  1. #include "light.h"
  2. #include <stdio.h>
  3. #define LIGHT_RETURNVAL_INITFAIL 2
  4. #define LIGHT_RETURNVAL_EXECFAIL 1
  5. #define LIGHT_RETURNVAL_SUCCESS 0
  6. int main(int argc, char** argv)
  7. {
  8. if(!light_initialize(argc, argv))
  9. {
  10. LIGHT_ERR("Initialization failed");
  11. return LIGHT_RETURNVAL_INITFAIL;
  12. }
  13. if(!light_execute())
  14. {
  15. LIGHT_ERR("Execution failed");
  16. light_free();
  17. return LIGHT_RETURNVAL_EXECFAIL;
  18. }
  19. light_free();
  20. return LIGHT_RETURNVAL_SUCCESS;
  21. }