Lines Matching refs:envp
657 char *envp, *envname, *s;
663 if ((envp = getenv("HUNT")) != NULL) {
664 while ((s = strpbrk(envp, "=,")) != NULL) {
665 if (strncmp(envp, "cloak,", s - envp + 1) == 0) {
667 envp = s + 1;
669 else if (strncmp(envp, "scan,", s - envp + 1) == 0) {
671 envp = s + 1;
673 else if (strncmp(envp, "fly,", s - envp + 1) == 0) {
675 envp = s + 1;
677 else if (strncmp(envp, "nobeep,", s - envp + 1) == 0) {
679 envp = s + 1;
681 else if (strncmp(envp, "name=", s - envp + 1) == 0) {
683 if ((s = strchr(envp, ',')) == NULL) {
684 *envp = '\0';
690 envp = s + 1;
693 else if (strncmp(envp, "port=", s - envp + 1) == 0) {
696 if ((s = strchr(envp, ',')) == NULL) {
697 *envp = '\0';
701 envp = s + 1;
703 else if (strncmp(envp, "host=", s - envp + 1) == 0) {
705 if ((s = strchr(envp, ',')) == NULL) {
706 *envp = '\0';
710 envp = s + 1;
712 else if (strncmp(envp, "message=", s - envp + 1) == 0) {
714 if ((s = strchr(envp, ',')) == NULL) {
715 *envp = '\0';
719 envp = s + 1;
722 else if (strncmp(envp, "team=", s - envp + 1) == 0) {
726 if ((s = strchr(envp, ',')) == NULL) {
727 *envp = '\0';
731 envp = s + 1;
733 else if (strncmp(envp, "mapkey=", s - envp + 1) == 0) {
740 *envp = '\0';
744 printf("unknown option %s\n", envp);
745 if ((s = strchr(envp, ',')) == NULL) {
746 *envp = '\0';
749 envp = s + 1;
752 if (*envp != '\0') {
754 strncpy(name, envp, sizeof(name));
756 printf("unknown option %s\n", envp);