comparison win95kggui/src/win95kggui.c @ 111:677f84ada082

Update win95kggui.c committer: GitHub <noreply@github.com>
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Sun, 30 Oct 2022 16:08:13 -0400
parents dbf5ce219fe3
children
comparison
equal deleted inserted replaced
110:48eea72be338 111:677f84ada082
60 } 60 }
61 return num; 61 return num;
62 } 62 }
63 63
64 int win95_suffix(bool is_oem) { 64 int win95_suffix(bool is_oem) {
65 int first_digits, last_digit, second_segment = 5; 65 int first_digits, last_digit, second_segment;
66 while (get_sum(second_segment) % 7 != 0) { 66 do {
67 if (is_oem == false) { 67 if (is_oem == false) {
68 first_digits = rand() % 999999; 68 first_digits = rand() % 999999;
69 } else { 69 } else {
70 first_digits = rand() % 9999; 70 first_digits = rand() % 9999;
71 } 71 }
72 last_digit = rand() % 9; 72 last_digit = rand() % 9;
73 while ((last_digit == 0) || (last_digit >= 8)) { 73 while ((last_digit == 0) || (last_digit >= 8)) {
74 last_digit = rand() % 9; 74 last_digit = rand() % 9;
75 } 75 }
76 second_segment = CONCAT_INTS(first_digits, last_digit); 76 second_segment = CONCAT_INTS(first_digits, last_digit);
77 } 77 } while (get_sum(second_segment) % 7 != 0);
78 return second_segment; 78 return second_segment;
79 } 79 }
80 80
81 int office_prefix() { 81 int office_prefix() {
82 int new_site = 0; 82 int new_site, ez_pwned;
83 int ez_pwned = 0; 83 do {
84 while (CONCAT_INTS(new_site, ez_pwned) == 0) {
85 new_site = rand() % 99; 84 new_site = rand() % 99;
86 ez_pwned = (new_site % 10) + 2; 85 ez_pwned = (new_site % 10) + 2;
87 if (ez_pwned >= 10) { 86 if (ez_pwned >= 10) {
88 ez_pwned -= 10; 87 ez_pwned -= 10;
89 } 88 }
90 } 89 } while (CONCAT_INTS(new_site, ez_pwned) == 0);
91 return CONCAT_INTS(new_site, ez_pwned); 90 return CONCAT_INTS(new_site, ez_pwned);
92 } 91 }
93 92
94 int oem_prefix() { 93 int oem_prefix() {
95 const char* years[] = { 94 const char* years[] = {