home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / code_examples / librar / ucexchan.c < prev    next >
Text File  |  1989-02-08  |  640b  |  24 lines

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*          UCEXCHANGE(X,X,X)           */
  4. /*                    */
  5. /* Switches the contents of two unsigned*/
  6. /* character arrays.  The first two    */
  7. /* arguments are the arrays being    */
  8. /* switched.  The third argument is the    */
  9. /* dimension of the arrays.        */
  10. /*                    */
  11. /*--------------------------------------*/
  12. void ucexchange(a,b,c)
  13. unsigned char a[],b[];
  14. int c;
  15. {
  16.     unsigned char cc;
  17.         int j;
  18.         for (j=0;j<c;j++){
  19.              cc=a[j];
  20.              a[j]=b[j];
  21.              b[j]=cc;
  22.     }
  23. }
  24.