runtime example


SUBMITTED BY: Guest

DATE: May 18, 2014, 2:32 p.m.

FORMAT: Text only

SIZE: 326 Bytes

HITS: 2124

  1. Runtime Example
  2. /* silly C example for GeSHi */
  3. #ifndef getenv
  4. extern char *getenv ();
  5. #endif
  6. static char *
  7. my_index (str, chr)
  8. const char *str;
  9. int chr;
  10. {
  11. while (*str)
  12. {
  13. if (*str == chr)
  14. return (char *) str;
  15. str++;
  16. }
  17. return 0;
  18. }

comments powered by Disqus